From d226acaca999297637783c6039b614f0ee22e05a Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 10 Feb 2021 05:00:36 -0500 Subject: [PATCH] fixup! doc: optimize HTML rendering Co-authored-by: Darshan Sen --- tools/doc/html.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/doc/html.js b/tools/doc/html.js index 43c95901f5a589..ed90bb89510a16 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -67,7 +67,7 @@ const gtocHTML = unified() const templatePath = path.join(docPath, 'template.html'); const template = fs.readFileSync(templatePath, 'utf8'); -const wrapSections = (content) => { +function wrapSections(content) { let firstTime = true; return content.toString() .replace(/

{ @@ -77,7 +77,7 @@ const wrapSections = (content) => { } return '
' + heading; }) + (firstTime ? '' : '
'); -}; +} function toHTML({ input, content, filename, nodeVersion, versions }) { filename = path.basename(filename, '.md');