mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-08 06:43:49 +00:00
fix: table space and horizrule block new line
This commit is contained in:
parent
72dd18dfa5
commit
fb9f7a5ea1
@ -58,7 +58,7 @@ exports.parse = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.serialize = function(tree,serialize) {
|
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";
|
||||||
}
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -32,7 +32,7 @@ exports.parse = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.serialize = function(tree,serialize) {
|
exports.serialize = function(tree,serialize) {
|
||||||
return "---\n";
|
return "---\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -205,17 +205,17 @@ exports.serialize = function(tree, serialize) {
|
|||||||
if(cell.tag === "th") {
|
if(cell.tag === "th") {
|
||||||
serialized += "!";
|
serialized += "!";
|
||||||
}
|
}
|
||||||
// Serialize the cell content
|
// Cell content
|
||||||
serialized += serialize(cell.children);
|
serialized += serialize(cell.children);
|
||||||
// End the cell with a tailing space
|
// End the cell
|
||||||
serialized += " |";
|
serialized += "|";
|
||||||
}
|
}
|
||||||
// End the row
|
// End the row
|
||||||
serialized += "\n";
|
serialized += "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Return the complete serialized string
|
// Return the completed block
|
||||||
return serialized;
|
return serialized + "\n";
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -9,4 +9,9 @@ Simple `JS` and complex
|
|||||||
```js
|
```js
|
||||||
var match = reEnd.exec(this.parser.source)
|
var match = reEnd.exec(this.parser.source)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```tid
|
||||||
|
<$list filter="[tag[ExampleTag]sort[title]]"/>
|
||||||
|
```
|
||||||
|
|
||||||
end
|
end
|
@ -2,7 +2,10 @@ tags: $:/tags/wikitext-serialize-test-spec
|
|||||||
title: Serialize/Table
|
title: Serialize/Table
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|! |!Alpha |!Beta |!Gamma |!Delta |
|
|!|!Alpha|!Beta|!Gamma|!Delta|
|
||||||
|!One | | | | |
|
|!One|||||
|
||||||
|!Two | | | | |
|
|!Two|||||
|
||||||
|!Three | | | | |
|
|!Three|||||
|
||||||
|
|
||||||
|
|cell one|cell two|
|
||||||
|
|cell three|cell four|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user