Skip to content

Commit

Permalink
Improve code and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelGirodon committed Aug 29, 2023
1 parent 37794e6 commit 57361c9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ The `--layout` option can receive the name of a [preset](./assets/layouts/)

A theme is a CSS stylesheet included in the HTML layout.

The `--theme` option can receive the name of a [preset](./assets/themes/) (e.g.
`github`) or the path to a custom theme file (`path/to/my-theme.css` or an HTTP
URL).
The `--theme` option can receive the name of a preset (e.g. `github`)
or the path to a custom theme file (`path/to/my-theme.css` or an HTTP URL).

#### Highlight style (`--highlight-style`)

Expand Down
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function randomId() {

/**
* Get the text content of the first element matching the given tag
* using a naive regex-base search which is very limited, but avoids
* using a naive regex-based search which is very limited, but avoids
* importing a full HTML parser library only to do that.
* @param {string} html The HTML document
* @param {string} tag The HTML tag name
Expand Down
4 changes: 2 additions & 2 deletions test/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ before(async () => {
});
await fs.mkdir(buildDataPath("img"), { recursive: true });
for (let url of Object.keys(images)) {
const data = (await request(url)).body;
await fs.writeFile(buildDataPath(images[url]), data);
const res = await request(url);
await fs.writeFile(buildDataPath(images[url]), res.body);
}
await fs.writeFile(buildDataPath("README.md"), output, { encoding: "utf8" });
});
Expand Down

0 comments on commit 57361c9

Please sign in to comment.