mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-25 07:06:08 +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),
|
var nameToken = $tw.utils.parseTokenRegExp(source,pos,reAttributeName),
|
||||||
namePos = nameToken && $tw.utils.skipWhiteSpace(source,nameToken.end),
|
namePos = nameToken && $tw.utils.skipWhiteSpace(source,nameToken.end),
|
||||||
separatorToken = nameToken && $tw.utils.parseTokenRegExp(source,namePos,/=|:/g),
|
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 we have a name and a separator then we have a named attribute
|
||||||
if(nameToken && separatorToken) {
|
if(nameToken && separatorToken) {
|
||||||
node.name = nameToken.match[1];
|
node.name = nameToken.match[1];
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ It is $param$
|
|||||||
-
|
-
|
||||||
<$text text=<<mamacromamacro param={{{ [[a]addprefix[b]] }}}>>/>
|
<$text text=<<mamacromamacro param={{{ [[a]addprefix[b]] }}}>>/>
|
||||||
-
|
-
|
||||||
<$text text=<<mamacromamacro param={{{ [[b]addprefix[a]] }}}>>/>
|
|
||||||
-
|
|
||||||
<$text text=<<mamacromamacro {{{ [[b]addprefix[a]] }}}>>/>
|
|
||||||
-
|
|
||||||
<$text text=<<mamacromamacro param>>/>
|
<$text text=<<mamacromamacro param>>/>
|
||||||
|
|
||||||
+
|
+
|
||||||
@@ -26,9 +22,5 @@ title: ExpectedResult
|
|||||||
-
|
-
|
||||||
It is ba
|
It is ba
|
||||||
-
|
-
|
||||||
It is ab
|
|
||||||
-
|
|
||||||
It is ab
|
|
||||||
-
|
|
||||||
It is param
|
It is param
|
||||||
</p>
|
</p>
|
||||||
@@ -15,10 +15,9 @@ It is $one$ and $two$ or <<__one__>> and <<__two__>>.
|
|||||||
|
|
||||||
<<mamacro one={{{ [[b]addprefix[a]] }}}>>
|
<<mamacro one={{{ [[b]addprefix[a]] }}}>>
|
||||||
|
|
||||||
<<mamacro {{{ [[b]addprefix[a]] }}}>>
|
|
||||||
|
|
||||||
<<mamacro one>>
|
<<mamacro one>>
|
||||||
+
|
+
|
||||||
title: ExpectedResult
|
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