Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tools,doc: upgrade dependencies
PR-URL: #35244
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
  • Loading branch information
aduh95 authored and MylesBorins committed Nov 16, 2020
1 parent d938e85 commit 11b10d7
Show file tree
Hide file tree
Showing 5 changed files with 541 additions and 415 deletions.
2 changes: 1 addition & 1 deletion tools/doc/generate.js
Expand Up @@ -87,7 +87,7 @@ async function main() {
.use(html.firstHeader)
.use(html.preprocessElements, { filename })
.use(html.buildToc, { filename, apilinks })
.use(remark2rehype, { allowDangerousHTML: true })
.use(remark2rehype, { allowDangerousHtml: true })
.use(raw)
.use(htmlStringify)
.process(input);
Expand Down
6 changes: 3 additions & 3 deletions tools/doc/html.js
Expand Up @@ -54,7 +54,7 @@ const gtocPath = path.join(docPath, 'api', 'index.md');
const gtocMD = fs.readFileSync(gtocPath, 'utf8').replace(/^<!--.*?-->/gms, '');
const gtocHTML = unified()
.use(markdown)
.use(remark2rehype, { allowDangerousHTML: true })
.use(remark2rehype, { allowDangerousHtml: true })
.use(raw)
.use(navClasses)
.use(htmlStringify)
Expand Down Expand Up @@ -281,7 +281,7 @@ function parseYAML(text) {
meta.changes.forEach((change) => {
const description = unified()
.use(markdown)
.use(remark2rehype, { allowDangerousHTML: true })
.use(remark2rehype, { allowDangerousHtml: true })
.use(raw)
.use(htmlStringify)
.processSync(change.description).toString();
Expand Down Expand Up @@ -368,7 +368,7 @@ function buildToc({ filename, apilinks }) {

file.toc = unified()
.use(markdown)
.use(remark2rehype, { allowDangerousHTML: true })
.use(remark2rehype, { allowDangerousHtml: true })
.use(raw)
.use(htmlStringify)
.processSync(toc).toString();
Expand Down
4 changes: 2 additions & 2 deletions tools/doc/json.js
Expand Up @@ -24,7 +24,7 @@
const unified = require('unified');
const common = require('./common.js');
const html = require('remark-html');
const select = require('unist-util-select');
const { selectAll } = require('unist-util-select');

module.exports = { jsonAPI };

Expand All @@ -38,7 +38,7 @@ function jsonAPI({ filename }) {
const stabilityExpr = /^Stability: ([0-5])(?:\s*-\s*)?(.*)$/s;

// Extract definitions.
const definitions = select(tree, 'definition');
const definitions = selectAll('definition', tree);

// Determine the start, stop, and depth of each section.
const sections = [];
Expand Down

0 comments on commit 11b10d7

Please sign in to comment.