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

print-window-tiddler
Jeremy Ruston 2012-06-07 13:09:48 +01:00
rodzic 698f2c39cb
commit 22b27f4251
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -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],