1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-26 18:10:27 +00:00

Be as permissive as possible with parameter names

Previously restricted to upper and lower case, digits and dash and underscore
This commit is contained in:
jeremy@jermolene.com 2022-05-02 10:56:09 +01:00
parent 5f02cc49fd
commit ea7199600d
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ exports.parse = function() {
var paramString = this.match[3],
params = [];
if(this.match[2]) {
var reParam = /\s*([A-Za-z0-9\-_]+)(?:\s*:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|([^"'\s]+)))?/mg,
var reParam = /\s*([^:)\s]+)(?:\s*:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|([^"'\s]+)))?/mg,
paramMatch = reParam.exec(paramString);
while(paramMatch) {
// Save the parameter details

View File

@ -39,7 +39,7 @@ exports.parse = function() {
var paramString = this.match[1],
attributes = Object.create(null),
orderedAttributes = [],
reParam = /\s*([A-Za-z0-9\-_]+)(?:\s*:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|([^"'\s]+)))?/mg,
reParam = /\s*([^:)\s]+)(?:\s*:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|([^"'\s]+)))?/mg,
paramMatch = reParam.exec(paramString);
while(paramMatch) {
// Save the parameter details