mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-15 09:12:24 +02:00
ESLintify Part 1 (#837)
* ESLint-ify * Allow empty try/catch * Escape regexp
This commit is contained in:
parent
128dbfca0a
commit
e8e3f42685
44 changed files with 466 additions and 555 deletions
|
@ -52,8 +52,8 @@ module.exports = (content, headingTags = 'h2', subHeadingTags = 'h3') => {
|
|||
if (headingLevels.includes(heading.lvl)) {
|
||||
toc.push(entry);
|
||||
current = entry;
|
||||
} else {
|
||||
current && current.children.push(entry);
|
||||
} else if (current) {
|
||||
current.children.push(entry);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue