Merge 690d65ec51 into 7628bcac01
This commit is contained in:
commit
5b3b3ab4de
|
|
@ -60,7 +60,8 @@ function OutputStream(options) {
|
||||||
bracketize : false,
|
bracketize : false,
|
||||||
semicolons : true,
|
semicolons : true,
|
||||||
comments : false,
|
comments : false,
|
||||||
preserve_line : false
|
preserve_line : false,
|
||||||
|
quote_char : null
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
var indentation = 0;
|
var indentation = 0;
|
||||||
|
|
@ -95,7 +96,8 @@ function OutputStream(options) {
|
||||||
return s;
|
return s;
|
||||||
});
|
});
|
||||||
if (options.ascii_only) str = to_ascii(str);
|
if (options.ascii_only) str = to_ascii(str);
|
||||||
if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'";
|
var quote_char = options.quote_char || (dq > sq ? "'" : '"');
|
||||||
|
if (quote_char === "'") return "'" + str.replace(/\x27/g, "\\'") + "'";
|
||||||
else return '"' + str.replace(/\x22/g, '\\"') + '"';
|
else return '"' + str.replace(/\x22/g, '\\"') + '"';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user