First work on actual site contents.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user