1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 12:07:19 +00:00

Ensured block macros parse their content as blocks, rather than a run

This commit is contained in:
Jeremy Ruston 2012-06-07 13:09:48 +01:00
parent 698f2c39cb
commit 22b27f4251

View File

@ -35,7 +35,12 @@ exports.parse = function(match,isBlock) {
if(match && match.index === this.pos) {
this.pos = match.index + match[0].length;
if(match[5]) {
content = this.parseRun(/(>>)/mg);
// If the macro has content then parse it as a block or run
if(isBlock) {
content = this.parseBlockTerminated(/(^>>$)/mg);
} else {
content = this.parseRun(/(>>)/mg);
}
}
var macroNode = $tw.Tree.Macro(match[1] || match[2],{
srcParams: match[3],