mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-10-17 13:22:27 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user