Skip to content

Commit a5b6e4d

Browse files
author
e2tha-e
committed
minor regex update
1 parent e67e2d8 commit a5b6e4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builder/parameter_hunter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
//strip out the additional data, convert string to JSON.
3939
var leftParen = pMatch.indexOf('(');
4040
var rightParen = pMatch.indexOf(')');
41-
var paramString = '{' + pMatch.substring(leftParen + 1, rightParen) + '}';
41+
var paramString = '{' + pMatch.substring(leftParen + 1, rightParen) + '}';
4242
//if param keys are wrapped in single quotes, replace with double quotes.
43-
var paramStringWellFormed = paramString.replace(/(')([^'\s]+)(')(\s*\:)/gm, '"$2"$4');
43+
var paramStringWellFormed = paramString.replace(/(')([^']+)(')(\s*\:)/gm, '"$2"$4');
4444
//if params keys are not wrapped in any quotes, wrap in double quotes.
4545
var paramStringWellFormed = paramStringWellFormed.replace(/([\{|,]\s*)([^\:\s]+)(\s*\:)/gm, '$1"$2"$3');
4646
//if param values are wrapped in single quotes, replace with double quotes.

0 commit comments

Comments
 (0)