Changes to v3.
This commit is contained in:
@@ -12,8 +12,6 @@ export async function parse(lines, schema) {
|
||||
}
|
||||
}
|
||||
|
||||
const macros = schema.macros
|
||||
|
||||
const scopes = [createScope('root', {
|
||||
title ({ addHandler }) {
|
||||
addHandler(scope => [scope[0].split(' ')[0], scope[0].split(' ').slice(1).join(' ')])
|
||||
@@ -27,10 +25,9 @@ export async function parse(lines, schema) {
|
||||
}
|
||||
})]
|
||||
|
||||
let ended = false
|
||||
while (!ended) {
|
||||
ended = await doc.next()
|
||||
if (ended) break;
|
||||
while (true) {
|
||||
// If doc.next() returns true we've ended the document.
|
||||
if (await doc.next()) break;
|
||||
const level = doc.level() + 1
|
||||
|
||||
// Trigger macros for closed scopes.
|
||||
|
||||
Reference in New Issue
Block a user