mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-14 03:10:26 +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:
parent
5f02cc49fd
commit
ea7199600d
@ -40,7 +40,7 @@ exports.parse = function() {
|
|||||||
var paramString = this.match[3],
|
var paramString = this.match[3],
|
||||||
params = [];
|
params = [];
|
||||||
if(this.match[2]) {
|
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);
|
paramMatch = reParam.exec(paramString);
|
||||||
while(paramMatch) {
|
while(paramMatch) {
|
||||||
// Save the parameter details
|
// Save the parameter details
|
||||||
|
@ -39,7 +39,7 @@ exports.parse = function() {
|
|||||||
var paramString = this.match[1],
|
var paramString = this.match[1],
|
||||||
attributes = Object.create(null),
|
attributes = Object.create(null),
|
||||||
orderedAttributes = [],
|
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);
|
paramMatch = reParam.exec(paramString);
|
||||||
while(paramMatch) {
|
while(paramMatch) {
|
||||||
// Save the parameter details
|
// Save the parameter details
|
||||||
|
Loading…
Reference in New Issue
Block a user