| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1a20d27 commit 7c09bd5
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,14 @@ import { fileURLToPath } from 'node:url'; | |||
| 5 | 5 | ||
| 6 | 6 | const root = new URL('../../', import.meta.url); | |
| 7 | 7 | ||
| 8 | - const fromRoot = (path) => fileURLToPath(new URL(path, root)); | ||
| 8 | + // POSIX separators, because `input` is a glob pattern and a backslash reads as | ||
| 9 | + // an escape character, which would mangle Windows paths into non-matches. | ||
| 10 | + const fromRoot = (path) => | ||
| 11 | + fileURLToPath(new URL(path, root)).replaceAll('\\', '/'); | ||
| 12 | + | ||
| 13 | + // doc-kit only treats a value as local when it parses as a `file:` URL, and a | ||
| 14 | + // Windows drive letter parses as a URL scheme, so these must stay URLs. | ||
| 15 | + const urlFromRoot = (path) => new URL(path, root).href; | ||
| 9 | 16 | ||
| 10 | 17 | export default { | |
| 11 | 18 | target: ['man-page'], | |
@@ -15,7 +22,7 @@ export default { | |||
| 15 | 22 | output: fromRoot('tools/doc/.manpagecheck'), | |
| 16 | 23 | ||
| 17 | 24 | // Point every loadable URL at its local file so no network request is made. | |
| 18 | - changelog: fromRoot('CHANGELOG.md'), | ||
| 19 | - index: fromRoot('doc/api/index.md'), | ||
| 25 | + changelog: urlFromRoot('CHANGELOG.md'), | ||
| 26 | + index: urlFromRoot('doc/api/index.md'), | ||
| 20 | 27 | }, | |
| 21 | 28 | }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments