| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3804836 commit df7d33e
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,9 +67,9 @@ fs.readFile(filename, 'utf8', (er, input) => { | |||
| 67 | 67 | ||
| 68 | 68 | const content = unified() | |
| 69 | 69 | .use(markdown) | |
| 70 | + .use(html.preprocessText) | ||
| 70 | 71 | .use(json.jsonAPI, { filename }) | |
| 71 | 72 | .use(html.firstHeader) | |
| 72 | - .use(html.preprocessText) | ||
| 73 | 73 | .use(html.preprocessElements, { filename }) | |
| 74 | 74 | .use(html.buildToc, { filename }) | |
| 75 | 75 | .use(remark2rehype, { allowDangerousHTML: true }) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -198,7 +198,10 @@ function preprocessElements({ filename }) { | |||
| 198 | 198 | heading.children = [{ | |
| 199 | 199 | type: 'text', | |
| 200 | 200 | value: file.contents.slice( | |
| 201 | - position.start.offset, position.end.offset), | ||
| 201 | + position.start.offset, position.end.offset) | ||
| 202 | + .replace('<', '<') | ||
| 203 | + .replace('>', '>') | ||
| 204 | + .replace(/\\(.{1})/g, '$1'), | ||
| 202 | 205 | position | |
| 203 | 206 | }]; | |
| 204 | 207 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments