docs: fix the 1st command documented not showing up in the site

Rogue .slice(1)
This commit is contained in:
Starbeamrainbowlabs 2023-07-11 00:52:04 +01:00
parent c8e717a6d6
commit 7236232dc0
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ let { sections, categories } = parse_sections(fs.readFileSync(
"utf-8"
))
sections = sections.slice(1).sort((a, b) => a.title.replace(/^\/+/g, "").localeCompare(
sections = sections.sort((a, b) => a.title.replace(/^\/+/g, "").localeCompare(
b.title.replace(/^\/+/g, "")));

View File

@ -57,7 +57,7 @@ module.exports = function parse_sections(source) {
for(let line of lines) {
if(line.startsWith(`#`)) {
let heading_level = line.match(/^#+/)[0].length
let heading_level = line.match(/^#+/)[0].length;
// 1: Deal with the previous section
if(acc.length > 0) {