Remove 'nest-whitespace-under-previous-line' logic and move it out to the same level, simplifying parser logic. Users of this lib can implement such behavior if they'd like.
This commit is contained in:
@@ -110,10 +110,10 @@ async function main() {
|
||||
if (match('name')) author.name = tail().trim()
|
||||
else if (match('email')) author.email = tail().trim()
|
||||
else {
|
||||
if (!author['#text']) author['#text'] = [line()]
|
||||
if (!author['#text']) author['#text'] = [level(), line(l + 1)]
|
||||
// Loop through all remaining lines to avoid re-matching name or email above.
|
||||
while(await next(l)) {
|
||||
author['#text'].push(line())
|
||||
author['#text'].push(level(), line(l + 1))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user