mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-05 23:10:28 +00:00
feat: allow recursive
This commit is contained in:
parent
84e27c05b9
commit
078967c830
@ -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";
|
||||
}
|
||||
|
||||
|
@ -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) + "`";
|
||||
}
|
||||
|
||||
})();
|
||||
|
@ -31,7 +31,7 @@ exports.parse = function() {
|
||||
return [{type: "element", tag: "hr"}];
|
||||
};
|
||||
|
||||
exports.serialize = function() {
|
||||
exports.serialize = function(tree,serialize) {
|
||||
return "---\n";
|
||||
}
|
||||
|
||||
|
@ -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") {
|
||||
|
Loading…
Reference in New Issue
Block a user