mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-29 00:47:03 +02:00
misc(v2): clean up comments in code (#2294)
This commit is contained in:
parent
d7f3dff6e6
commit
996b115199
45 changed files with 234 additions and 155 deletions
|
@ -29,12 +29,13 @@ function toValue(node) {
|
|||
default:
|
||||
}
|
||||
}
|
||||
|
||||
return toString(node);
|
||||
}
|
||||
|
||||
// Visit all headings. We `slug` all headings (to account for
|
||||
// duplicates), but only take h2 and h3 headings.
|
||||
const search = node => {
|
||||
function search(node) {
|
||||
const headings = [];
|
||||
let current = -1;
|
||||
let currentDepth = 0;
|
||||
|
@ -65,6 +66,6 @@ const search = node => {
|
|||
visit(node, 'heading', onHeading);
|
||||
|
||||
return headings;
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = search;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue