| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bf78365 commit 9d92887
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -161,7 +161,7 @@ function linkJsTypeDocs(text) { | |||
| 161 | 161 | ||
| 162 | 162 | // Preprocess headers, stability blockquotes, and YAML blocks. | |
| 163 | 163 | function preprocessElements({ filename }) { | |
| 164 | - return (tree, file) => { | ||
| 164 | + return (tree) => { | ||
| 165 | 165 | const STABILITY_RE = /(.*:)\s*(\d)([\s\S]*)/; | |
| 166 | 166 | let headingIndex = -1; | |
| 167 | 167 | let heading = null; | |
@@ -170,26 +170,6 @@ function preprocessElements({ filename }) { | |||
| 170 | 170 | if (node.type === 'heading') { | |
| 171 | 171 | headingIndex = index; | |
| 172 | 172 | heading = node; | |
| 173 | - | ||
| 174 | - // Ensure optional API parameters are not treated as links by | ||
| 175 | - // collapsing all of heading into a single text node. | ||
| 176 | - if (heading.children.length > 1) { | ||
| 177 | - const position = { | ||
| 178 | - start: heading.children[0].position.start, | ||
| 179 | - end: heading.position.end | ||
| 180 | - }; | ||
| 181 | - | ||
| 182 | - heading.children = [{ | ||
| 183 | - type: 'text', | ||
| 184 | - value: file.contents.slice( | ||
| 185 | - position.start.offset, position.end.offset) | ||
| 186 | - .replace('<', '<') | ||
| 187 | - .replace('>', '>') | ||
| 188 | - .replace(/\\(.{1})/g, '$1'), | ||
| 189 | - position | ||
| 190 | - }]; | ||
| 191 | - } | ||
| 192 | - | ||
| 193 | 173 | } else if (node.type === 'html' && common.isYAMLBlock(node.value)) { | |
| 194 | 174 | node.value = parseYAML(node.value); | |
| 195 | 175 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,14 +12,14 @@ | |||
| 12 | 12 | "remark-html": "^7.0.0", | |
| 13 | 13 | "remark-parse": "^5.0.0", | |
| 14 | 14 | "remark-rehype": "^3.0.0", | |
| 15 | - "to-vfile": "^5.0.0", | ||
| 15 | + "to-vfile": "^5.0.1", | ||
| 16 | 16 | "unified": "^7.0.0", | |
| 17 | 17 | "unist-util-find": "^1.0.1", | |
| 18 | 18 | "unist-util-select": "^1.5.0", | |
| 19 | - "unist-util-visit": "^1.3.1" | ||
| 19 | + "unist-util-visit": "^1.4.0" | ||
| 20 | 20 | }, | |
| 21 | 21 | "devDependencies": { | |
| 22 | - "js-yaml": "^3.5.2" | ||
| 22 | + "js-yaml": "^3.12.2" | ||
| 23 | 23 | }, | |
| 24 | 24 | "optionalDependencies": {}, | |
| 25 | 25 | "bin": "./generate.js" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments