@@ -5,7 +5,14 @@ import { fileURLToPath } from 'node:url';
55
66const root = new URL ( '../../' , import . meta. url ) ;
77
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 ;
916
1017export default {
1118 target : [ 'man-page' ] ,
@@ -15,7 +22,7 @@ export default {
1522 output : fromRoot ( 'tools/doc/.manpagecheck' ) ,
1623
1724 // 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' ) ,
2027 } ,
2128} ;
0 commit comments