1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-02 19:08:02 +00:00

Text-slicer: Retain text outside paragraphs

This commit is contained in:
Jermolene
2018-01-11 12:43:24 +00:00
parent 4e433966f4
commit 92870c0b2d

View File

@@ -361,6 +361,11 @@ Slicer.prototype.onEnd = function() {
Slicer.prototype.addTextToCurrentChunk = function(str,field) {
field = field || "text";
if(this.currentChunk === null && str.trim() !== "") {
this.startNewChunk({
"toc-type": "paragraph"
});
}
if(this.currentChunk !== null) {
this.chunks[this.currentChunk][field] += str;
}