Skip to content

Commit

Permalink
docs: use correct language in code block
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoffer Åström committed Mar 13, 2019
1 parent 492f0e4 commit fced189
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/protractor-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: protractor-examples
title: Protractor
---

```javascript
```html
<html lang="en">

<head>
Expand All @@ -29,7 +29,7 @@ title: Protractor

**[examples/protractor/test/hello.fix.html](https://github.com/qlik-oss/after-work.js/tree/master/examples/protractor/test/hello.fix.html)**

```javascript
```html
<html lang="en">
<head>
<title>Test</title>
Expand Down
2 changes: 1 addition & 1 deletion docs/puppeteer-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: puppeteer-examples
title: Puppeteer
---

```javascript
```html
<html lang="en">
<head>
<title>Test</title>
Expand Down
6 changes: 3 additions & 3 deletions scripts/generate-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ id: ${example.name}-examples
title: ${example.name.charAt(0).toUpperCase() + example.name.slice(1)}
---\n\n`;

const appendFile = (file) => {
md += `\`\`\`javascript\n${fs.readFileSync(file, 'utf8')}\`\`\`\n\n`;
const appendFile = (file, lang = 'javascript') => {
md += `\`\`\`${lang}\n${fs.readFileSync(file, 'utf8')}\`\`\`\n\n`;
md += `**[${file}](${baseUrl}/${file})**\n\n`;
};

const fixtureFiles = globby.sync(`${example.p}/test/**/*.fix.html`);
for (const file of fixtureFiles) {
appendFile(file);
appendFile(file, 'html');
}

const files = globby.sync(`${example.p}/test/**/*.spec.{js,ts}`);
Expand Down

0 comments on commit fced189

Please sign in to comment.