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: avoid pending deprecation in doc generator · nodejs/node@2ba6db3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tools/doc
    • html.js
    • package-lock.json
    • package.json
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/doc/html.js‎

Copy file name to clipboardExpand all lines: tools/doc/html.js
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
const common = require('./common.js');
2525
const fs = require('fs');
2626
const unified = require('unified');
27-
const find = require('unist-util-find');
2827
const visit = require('unist-util-visit');
2928
const markdown = require('remark-parse');
3029
const gfm = require('remark-gfm');
@@ -97,7 +96,13 @@ function toHTML({ input, content, filename, nodeVersion, versions }) {
9796
// Set the section name based on the first header. Default to 'Index'.
9897
function firstHeader() {
9998
return (tree, file) => {
100-
const heading = find(tree, { type: 'heading' });
99+
let heading;
100+
visit(tree, (node) => {
101+
if (node.type === 'heading') {
102+
heading = node;
103+
return false;
104+
}
105+
});
101106

102107
if (heading && heading.children.length) {
103108
const recursiveTextContent = (node) =>
Collapse file

‎tools/doc/package-lock.json‎

Copy file name to clipboardExpand all lines: tools/doc/package-lock.json
-83Lines changed: 0 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎tools/doc/package.json‎

Copy file name to clipboardExpand all lines: tools/doc/package.json
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"remark-rehype": "8.0.0",
1818
"to-vfile": "6.1.0",
1919
"unified": "9.2.0",
20-
"unist-util-find": "^1.0.2",
2120
"unist-util-select": "3.0.4",
2221
"unist-util-visit": "2.0.3"
2322
},

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.