mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-06 22:20:02 +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) {
|
Slicer.prototype.addTextToCurrentChunk = function(str,field) {
|
||||||
field = field || "text";
|
field = field || "text";
|
||||||
|
if(this.currentChunk === null && str.trim() !== "") {
|
||||||
|
this.startNewChunk({
|
||||||
|
"toc-type": "paragraph"
|
||||||
|
});
|
||||||
|
}
|
||||||
if(this.currentChunk !== null) {
|
if(this.currentChunk !== null) {
|
||||||
this.chunks[this.currentChunk][field] += str;
|
this.chunks[this.currentChunk][field] += str;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user