Update helpers.flattenLists to provide correct lastLineIndex for lists with an empty last item (fixes #529).

This commit is contained in:
David Anson 2022-06-07 22:16:34 -07:00
parent 4560ccc1cd
commit 85d720cefc
6 changed files with 175 additions and 10 deletions

View file

@ -395,7 +395,7 @@ module.exports.flattenLists = function flattenLists(tokens) {
else if (token.type === "blockquote_close") {
nesting = nestingStack.pop();
}
else if (token.map) {
if (token.map) {
// Track last token with map
lastWithMap = token;
}