diff options
Diffstat (limited to 'vhosts/blog/nuldoc-src')
| -rw-r--r-- | vhosts/blog/nuldoc-src/ndoc/to_html.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/vhosts/blog/nuldoc-src/ndoc/to_html.ts b/vhosts/blog/nuldoc-src/ndoc/to_html.ts index ddb041d5..2ca11a93 100644 --- a/vhosts/blog/nuldoc-src/ndoc/to_html.ts +++ b/vhosts/blog/nuldoc-src/ndoc/to_html.ts @@ -27,7 +27,7 @@ export default function toHtml(doc: Document): Document { } function removeUnnecessaryTextNode(doc: Document) { - const g = (n: Node) => { + forEachChildRecursively(doc.root, (n) => { if (n.kind !== "element") { return; } @@ -52,10 +52,7 @@ function removeUnnecessaryTextNode(doc: Document) { changed = true; } } - - forEachChild(n, g); - }; - forEachChild(doc.root, g); + }); } function transformSectionIdAttribute(doc: Document) { |
