[+] Collapse command

This commit is contained in:
Hykilpikonna
2021-12-25 01:19:49 -05:00
parent 802c404ce1
commit e3760926fb
+11
View File
@@ -83,6 +83,17 @@ export function parseExtensions(raw: string): string
lines[i] = lines[i].replace(re.command, s)
}
/**
* Collapse section
*/
function collapseSection()
{
const e = findSectionEnd()
const title = lines[i].substring(lines[i].indexOf(' ') + 1).replace(re.command, '')
lines[i] = `<Collapse title="${encodeURIComponent(title)}">`
lines.splice(e, 0, '</Collapse>\n')
}
// Run all commands in markdown
while (i < lines.length)
{