1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

feat: make sure block rule all have \n\n for visiblity

This commit is contained in:
lin onetwo 2024-10-13 21:36:35 +08:00
parent fb9f7a5ea1
commit 47cc03d05d
6 changed files with 29 additions and 6 deletions

View File

@ -139,7 +139,7 @@ exports.serialize = function(tree, serialize) {
}
serialized += "<%endif%>";
return serialized;
return serialized += "\n\n";
};
})();

View File

@ -83,7 +83,7 @@ exports.serialize = function(tree, serialize) {
serialized += "}"
// CSS classes
if(tree.attributes.itemClass) serialized += "." + tree.attributes.itemClass.value.split(" ").join(".");
return serialized + "\n";
return serialized + "\n\n";
};
})();

View File

@ -51,7 +51,7 @@ exports.serialize = function(tree, serialize) {
var headingLevel = parseInt(tree.tag.substr(1),10);
var classes = tree.attributes.class ? tree.attributes.class.value.split(" ").join(".") : "";
var headingText = serialize(tree.children);
return Array(headingLevel + 1).join("!") + (classes ? "." + classes : "") + " " + headingText + "\n";
return Array(headingLevel + 1).join("!") + (classes ? "." + classes : "") + " " + headingText + "\n\n";
};
})();

View File

@ -85,7 +85,7 @@ exports.serialize = function (tree, serialize) {
});
result.push("<<<");
}
return result.join("\n");
return result.join("\n") + "\n\n";
};
})();

View File

@ -3,7 +3,11 @@ title: Serialize/FilteredTranscludeBlock
type: text/vnd.tiddlywiki
{{{ [tag[docs]] }}}
{{{ [tag[docs]] |tooltip}}}
{{{ [tag[docs]] ||TemplateTitle}}}
{{{ [tag[docs]] |tooltip||TemplateTitle}}}
{{{ [tag[docs]] }}width:40;height:50;}.class.class
{{{ [tag[docs]] }}width:40;height:50;}.class.class

View File

@ -3,8 +3,27 @@ title: Serialize/Heading
type: text/vnd.tiddlywiki
! Heading 1
!! Heading 2
!!! Heading 3
!!!! Heading 4
!!!!! Heading 5
!!!!!! Heading 6
!!!!!! Heading 6
! AAA
!! AAA
!!! AAA
!!!! AAA
!!!!! AAA
!!!!!! AAA
AAA