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

fix: table space and horizrule block new line

This commit is contained in:
lin onetwo 2024-10-13 21:31:51 +08:00
parent 72dd18dfa5
commit fb9f7a5ea1
5 changed files with 19 additions and 11 deletions

View File

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

View File

@ -32,7 +32,7 @@ exports.parse = function() {
};
exports.serialize = function(tree,serialize) {
return "---\n";
return "---\n\n";
}
})();

View File

@ -205,17 +205,17 @@ exports.serialize = function(tree, serialize) {
if(cell.tag === "th") {
serialized += "!";
}
// Serialize the cell content
// Cell content
serialized += serialize(cell.children);
// End the cell with a tailing space
serialized += " |";
// End the cell
serialized += "|";
}
// End the row
serialized += "\n";
}
}
// Return the complete serialized string
return serialized;
// Return the completed block
return serialized + "\n";
};
})();

View File

@ -9,4 +9,9 @@ Simple `JS` and complex
```js
var match = reEnd.exec(this.parser.source)
```
```tid
<$list filter="[tag[ExampleTag]sort[title]]"/>
```
end

View File

@ -2,7 +2,10 @@ tags: $:/tags/wikitext-serialize-test-spec
title: Serialize/Table
type: text/vnd.tiddlywiki
|! |!Alpha |!Beta |!Gamma |!Delta |
|!One | | | | |
|!Two | | | | |
|!Three | | | | |
|!|!Alpha|!Beta|!Gamma|!Delta|
|!One|||||
|!Two|||||
|!Three|||||
|cell one|cell two|
|cell three|cell four|