First work on actual site contents.

This commit is contained in:
Joshua Bemenderfer
2023-02-12 16:52:47 -05:00
parent 4e10b07561
commit 95842b73bd
20 changed files with 181 additions and 24 deletions

View File

@@ -6,8 +6,7 @@ module.exports.contentAsText = async function(doc, rootLevel) {
let contentDepth = -1
while(await next(rootLevel)) {
if (!line()) continue
if (contentDepth === -1) contentDepth = level()
if (contentDepth === -1 && !!line()) contentDepth = level()
const indent = ''.padStart(level() - contentDepth, ' ')
linesAsArray.push(indent + line())