diff --git a/README.md b/README.md index d728e24..9197b05 100644 --- a/README.md +++ b/README.md @@ -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`) diff --git a/scripts/test-readme.js b/scripts/test-readme.js index 108740b..d33f2c9 100644 --- a/scripts/test-readme.js +++ b/scripts/test-readme.js @@ -6,6 +6,7 @@ import { spawnSync } from "node:child_process"; import { readFileSync, readdirSync, unlinkSync } from "node:fs"; import { chdir } from "node:process"; + import { ROOT_DIR } from "../src/files.js"; // Change current working directory to project root diff --git a/src/util.js b/src/util.js index 94dadcc..57e05bc 100644 --- a/src/util.js +++ b/src/util.js @@ -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 diff --git a/test/hooks.js b/test/hooks.js index 4f8550d..5c019a5 100644 --- a/test/hooks.js +++ b/test/hooks.js @@ -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" }); });