Allow colons in variable names in call syntax (#10015)

Accept a colon in the variable name of a `<<...>>` call and of an
`((...))` attribute reference, restoring the v5.3.8 name character
class. Call Syntax already describes the callee name as any
non-whitespace character other than `(` or `>`, and the colon is only
meaningful at the parameter name position.

* Add test cases for a colon name standalone, as an attribute value, as
  an =-separated parameter value, and with named parameters
* Add the 5.5.0 change note
This commit is contained in:
Mario Pietsch
2026-09-08 09:12:02 +01:00
committed by GitHub
parent d62b75cceb
commit 5577a3d07b
7 changed files with 109 additions and 2 deletions
+2 -2
View File
@@ -221,7 +221,7 @@ exports.parseMacroInvocationAsTransclusion = function(source,pos) {
orderedAttributes: []
};
// Define our regexps
var reVarName = /([^\s>"'=:]+)/y;
var reVarName = /([^\s>"'=]+)/y;
// Skip whitespace
pos = $tw.utils.skipWhiteSpace(source,pos);
// Look for a double opening angle bracket
@@ -269,7 +269,7 @@ exports.parseMVVReferenceAsTransclusion = function(source,pos) {
orderedAttributes: []
};
// Define our regexps
var reVarName = /([^\s>"'=:)]+)/y;
var reVarName = /([^\s>"'=)]+)/y;
// Skip whitespace
pos = $tw.utils.skipWhiteSpace(source,pos);
// Look for a double opening parenthesis