1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-05 23:10:28 +00:00

feat: allow recursive

This commit is contained in:
lin onetwo 2024-07-30 00:56:28 +08:00
parent 84e27c05b9
commit 078967c830
4 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ exports.parse = function() {
}];
};
exports.serialize = function(tree) {
exports.serialize = function(tree,serialize) {
return "\n```" + tree.attributes.language.value + "\n" + tree.attributes.code.value + "\n```\n";
}

View File

@ -55,8 +55,8 @@ exports.parse = function() {
}];
};
exports.serialize = function(tree) {
return "`" + tree.children[0].text + "`";
exports.serialize = function(tree,serialize) {
return "`" + serialize(tree.children) + "`";
}
})();

View File

@ -31,7 +31,7 @@ exports.parse = function() {
return [{type: "element", tag: "hr"}];
};
exports.serialize = function() {
exports.serialize = function(tree,serialize) {
return "---\n";
}

View File

@ -131,7 +131,7 @@ exports.serializeParseTree = function serializeParseTree(tree,tiddlerType) {
var output = [];
if($tw.utils.isArray(tree)) {
$tw.utils.each(tree,function(node) {
output.push(serializeParseTree(node));
output.push(serializeParseTree(node,tiddlerType));
});
} else {
if(tree.type === "text") {