Improved recipe config generation for complex objects. Fixes #180

This commit is contained in:
n1474335 2017-08-16 14:11:50 +00:00
parent 8a8b70f2ab
commit 0192566d19
1 changed files with 4 additions and 4 deletions

View File

@ -924,8 +924,8 @@ const Utils = {
// need to be percent-encoded.
.replace(/'/g, "\\'") // Escape single quotes
.replace(/\\"/g, '"') // Unescape double quotes
.replace(/(^|,)"/g, "$1'") // Replace opening " with '
.replace(/"(,|$)/g, "'$1"); // Replace closing " with '
.replace(/(^|,|{|:)"/g, "$1'") // Replace opening " with '
.replace(/"(,|:|}|$)/g, "'$1"); // Replace closing " with '
disabled = op.disabled ? "/disabled": "";
bp = op.breakpoint ? "/breakpoint" : "";
@ -959,8 +959,8 @@ const Utils = {
// Translate strings in args back to double-quotes
args = m[2]
.replace(/"/g, '\\"') // Escape double quotes
.replace(/(^|,)'/g, '$1"') // Replace opening ' with "
.replace(/([^\\])'(,|$)/g, '$1"$2') // Replace closing ' with "
.replace(/(^|,|{|:)'/g, '$1"') // Replace opening ' with "
.replace(/([^\\])'(,|:|}|$)/g, '$1"$2') // Replace closing ' with "
.replace(/\\'/g, "'"); // Unescape single quotes
args = "[" + args + "]";