mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 13:29:56 +00:00
Ensured block macros parse their content as blocks, rather than a run
This commit is contained in:
parent
698f2c39cb
commit
22b27f4251
@ -35,7 +35,12 @@ 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]) {
|
||||||
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],{
|
var macroNode = $tw.Tree.Macro(match[1] || match[2],{
|
||||||
srcParams: match[3],
|
srcParams: match[3],
|
||||||
|
Loading…
Reference in New Issue
Block a user