|
|
@ -17,7 +17,7 @@ module.exports = function splitTextComponents(treeList) {
|
|
|
|
/* Remove the last newline, because it's not delimiting anything. */
|
|
|
|
/* Remove the last newline, because it's not delimiting anything. */
|
|
|
|
splitItems.pop();
|
|
|
|
splitItems.pop();
|
|
|
|
|
|
|
|
|
|
|
|
return all.concat(splitItems);
|
|
|
|
return all.concat(splitItems.filter(item => item.text != ""));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return all.concat(flatten(item.contents, tagStack.concat([item])));
|
|
|
|
return all.concat(flatten(item.contents, tagStack.concat([item])));
|
|
|
|
}
|
|
|
|
}
|
|
|
|