1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-26 01:50:28 +00:00

Data widget: parse carriage returns in compound tiddlers

This commit is contained in:
jeremy@jermolene.com 2023-05-02 21:39:11 +01:00
parent cdf0d63f58
commit c6f15d8e8c

View File

@ -110,7 +110,7 @@ DataWidget.prototype.extractCompoundTiddler = function(title) {
var tiddler = this.wiki.getTiddler(title); var tiddler = this.wiki.getTiddler(title);
if(tiddler && tiddler.fields.type === "text/vnd.tiddlywiki-multiple") { if(tiddler && tiddler.fields.type === "text/vnd.tiddlywiki-multiple") {
var text = tiddler.fields.text || "", var text = tiddler.fields.text || "",
rawTiddlers = text.split("\n+\n"), rawTiddlers = text.split(/\r?\n\+\r?\n/),
tiddlers = []; tiddlers = [];
$tw.utils.each(rawTiddlers,function(rawTiddler) { $tw.utils.each(rawTiddlers,function(rawTiddler) {
var fields = Object.create(null), var fields = Object.create(null),