diff --git a/src/parser/from-tree.js b/src/parser/from-tree.js index 0b780c2..71742d5 100644 --- a/src/parser/from-tree.js +++ b/src/parser/from-tree.js @@ -17,7 +17,7 @@ module.exports = function splitTextComponents(treeList) { /* Remove the last newline, because it's not delimiting anything. */ splitItems.pop(); - return all.concat(splitItems); + return all.concat(splitItems.filter(item => item.text != "")); } else { return all.concat(flatten(item.contents, tagStack.concat([item]))); }