| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -87,7 +87,7 @@ async function main() { | |||
| 87 | 87 | .use(html.firstHeader) | |
| 88 | 88 | .use(html.preprocessElements, { filename }) | |
| 89 | 89 | .use(html.buildToc, { filename, apilinks }) | |
| 90 | - .use(remark2rehype, { allowDangerousHTML: true }) | ||
| 90 | + .use(remark2rehype, { allowDangerousHtml: true }) | ||
| 91 | 91 | .use(raw) | |
| 92 | 92 | .use(htmlStringify) | |
| 93 | 93 | .process(input); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -54,7 +54,7 @@ const gtocPath = path.join(docPath, 'api', 'index.md'); | |||
| 54 | 54 | const gtocMD = fs.readFileSync(gtocPath, 'utf8').replace(/^<!--.*?-->/gms, ''); | |
| 55 | 55 | const gtocHTML = unified() | |
| 56 | 56 | .use(markdown) | |
| 57 | - .use(remark2rehype, { allowDangerousHTML: true }) | ||
| 57 | + .use(remark2rehype, { allowDangerousHtml: true }) | ||
| 58 | 58 | .use(raw) | |
| 59 | 59 | .use(navClasses) | |
| 60 | 60 | .use(htmlStringify) | |
@@ -281,7 +281,7 @@ function parseYAML(text) { | |||
| 281 | 281 | meta.changes.forEach((change) => { | |
| 282 | 282 | const description = unified() | |
| 283 | 283 | .use(markdown) | |
| 284 | - .use(remark2rehype, { allowDangerousHTML: true }) | ||
| 284 | + .use(remark2rehype, { allowDangerousHtml: true }) | ||
| 285 | 285 | .use(raw) | |
| 286 | 286 | .use(htmlStringify) | |
| 287 | 287 | .processSync(change.description).toString(); | |
@@ -368,7 +368,7 @@ function buildToc({ filename, apilinks }) { | |||
| 368 | 368 | ||
| 369 | 369 | file.toc = unified() | |
| 370 | 370 | .use(markdown) | |
| 371 | - .use(remark2rehype, { allowDangerousHTML: true }) | ||
| 371 | + .use(remark2rehype, { allowDangerousHtml: true }) | ||
| 372 | 372 | .use(raw) | |
| 373 | 373 | .use(htmlStringify) | |
| 374 | 374 | .processSync(toc).toString(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,7 +24,7 @@ | |||
| 24 | 24 | const unified = require('unified'); | |
| 25 | 25 | const common = require('./common.js'); | |
| 26 | 26 | const html = require('remark-html'); | |
| 27 | - const select = require('unist-util-select'); | ||
| 27 | + const { selectAll } = require('unist-util-select'); | ||
| 28 | 28 | ||
| 29 | 29 | module.exports = { jsonAPI }; | |
| 30 | 30 | ||
@@ -38,7 +38,7 @@ function jsonAPI({ filename }) { | |||
| 38 | 38 | const stabilityExpr = /^Stability: ([0-5])(?:\s*-\s*)?(.*)$/s; | |
| 39 | 39 | ||
| 40 | 40 | // Extract definitions. | |
| 41 | - const definitions = select(tree, 'definition'); | ||
| 41 | + const definitions = selectAll('definition', tree); | ||
| 42 | 42 | ||
| 43 | 43 | // Determine the start, stop, and depth of each section. | |
| 44 | 44 | const sections = []; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments