1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-03-01 09:20:02 +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,8 +35,13 @@ exports.parse = function(match,isBlock) {
if(match && match.index === this.pos) { if(match && match.index === this.pos) {
this.pos = match.index + match[0].length; this.pos = match.index + match[0].length;
if(match[5]) { if(match[5]) {
// If the macro has content then parse it as a block or run
if(isBlock) {
content = this.parseBlockTerminated(/(^>>$)/mg);
} else {
content = this.parseRun(/(>>)/mg); content = this.parseRun(/(>>)/mg);
} }
}
var macroNode = $tw.Tree.Macro(match[1] || match[2],{ var macroNode = $tw.Tree.Macro(match[1] || match[2],{
srcParams: match[3], srcParams: match[3],
content: content, content: content,