1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-25 00:16:52 +00:00

Unquoted parameters should not eat a succeeding comma

Fixes #6672
This commit is contained in:
jeremy@jermolene.com 2022-05-02 13:49:41 +01:00
parent a10106a4a6
commit a888cd57cd
3 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ exports.parse = function() {
var paramString = this.match[3],
params = [];
if(this.match[2]) {
var reParam = /\s*([^:),\s]+)(?:\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*([^:),\s]+)(?:\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

View File

@ -15,13 +15,13 @@ _
title: TiddlerOne
\whitespace trim
\parameters(zero:'Jaguar',one:'Lizard',two:'Mole')
\parameters(zero:Jaguar,one:'Lizard',two:'Mole')
[{<$text text=<<zero>>/>}{<$text text=<<one>>/>}{<$text text=<<two>>/>}]
_
title: TiddlerTwo
\whitespace trim
\parameters(zero:'Mouse',one:'Horse',two:'Owl')
\parameters(zero:'Mouse',one:Horse,two:'Owl')
(<$transclude $tiddler=<<currentTiddler>> zero=<<zero>> one=<<one>> two=<<two>>/>)
_
title: ExpectedResult