mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Text-slicer: Retain text outside paragraphs
This commit is contained in:
parent
4e433966f4
commit
92870c0b2d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user