From 7236232dc0b130c8610f1b2f4f0aa484d90947e1 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 11 Jul 2023 00:52:04 +0100 Subject: [PATCH] docs: fix the 1st command documented not showing up in the site Rogue .slice(1) --- .docs/Reference.11tydata.js | 2 +- .docs/lib/parse_sections.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.docs/Reference.11tydata.js b/.docs/Reference.11tydata.js index 6b68fc8..268f5ab 100644 --- a/.docs/Reference.11tydata.js +++ b/.docs/Reference.11tydata.js @@ -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, ""))); diff --git a/.docs/lib/parse_sections.js b/.docs/lib/parse_sections.js index 768c7fe..a4040f8 100644 --- a/.docs/lib/parse_sections.js +++ b/.docs/lib/parse_sections.js @@ -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) {