mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-02-01 23:47:35 +00:00
On reflection, new style values should not be allowed for anonymous parameters
Backwards compatibility
This commit is contained in:
@@ -287,7 +287,7 @@ exports.parseMacroParameterAsAttribute = function(source,pos) {
|
||||
var nameToken = $tw.utils.parseTokenRegExp(source,pos,reAttributeName),
|
||||
namePos = nameToken && $tw.utils.skipWhiteSpace(source,nameToken.end),
|
||||
separatorToken = nameToken && $tw.utils.parseTokenRegExp(source,namePos,/=|:/g),
|
||||
isNewStyleSeparator = true; // If there is no separator then we allow new style values
|
||||
isNewStyleSeparator = false; // If there is no separator then we don't allow new style values
|
||||
// If we have a name and a separator then we have a named attribute
|
||||
if(nameToken && separatorToken) {
|
||||
node.name = nameToken.match[1];
|
||||
|
||||
@@ -13,10 +13,6 @@ It is $param$
|
||||
-
|
||||
<$text text=<<mamacromamacro param={{{ [[a]addprefix[b]] }}}>>/>
|
||||
-
|
||||
<$text text=<<mamacromamacro param={{{ [[b]addprefix[a]] }}}>>/>
|
||||
-
|
||||
<$text text=<<mamacromamacro {{{ [[b]addprefix[a]] }}}>>/>
|
||||
-
|
||||
<$text text=<<mamacromamacro param>>/>
|
||||
|
||||
+
|
||||
@@ -26,9 +22,5 @@ title: ExpectedResult
|
||||
-
|
||||
It is ba
|
||||
-
|
||||
It is ab
|
||||
-
|
||||
It is ab
|
||||
-
|
||||
It is param
|
||||
</p>
|
||||
@@ -15,10 +15,9 @@ It is $one$ and $two$ or <<__one__>> and <<__two__>>.
|
||||
|
||||
<<mamacro one={{{ [[b]addprefix[a]] }}}>>
|
||||
|
||||
<<mamacro {{{ [[b]addprefix[a]] }}}>>
|
||||
|
||||
<<mamacro one>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>It is red and green or red and green.</p><p>It is ab and green or ab and green.</p><p>It is ab and green or ab and green.</p><p>It is one and green or one and green.</p>
|
||||
<p>It is red and green or red and green.</p><p>It is ab and green or ab and green.</p><p>It is one and green or one and green.</p>
|
||||
Reference in New Issue
Block a user