GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: fix man-page generation on Windows · nodejs/node@7c09bd5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tools/doc
    • man-page.doc-kit.config.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/doc/man-page.doc-kit.config.mjs‎

Copy file name to clipboardExpand all lines: tools/doc/man-page.doc-kit.config.mjs
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ import { fileURLToPath } from 'node:url';
55

66
const 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

1017
export 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

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.