Skip to content

Commit d226aca

Browse files
aduh95RaisinTen
andauthored
fixup! doc: optimize HTML rendering
Co-authored-by: Darshan Sen <[email protected]>
1 parent 9f3a0af commit d226aca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/doc/html.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const gtocHTML = unified()
6767
const templatePath = path.join(docPath, 'template.html');
6868
const template = fs.readFileSync(templatePath, 'utf8');
6969

70-
const wrapSections = (content) => {
70+
function wrapSections(content) {
7171
let firstTime = true;
7272
return content.toString()
7373
.replace(/<h2/g, (heading) => {
@@ -77,7 +77,7 @@ const wrapSections = (content) => {
7777
}
7878
return '</section><section>' + heading;
7979
}) + (firstTime ? '' : '</section>');
80-
};
80+
}
8181

8282
function toHTML({ input, content, filename, nodeVersion, versions }) {
8383
filename = path.basename(filename, '.md');

0 commit comments

Comments
 (0)