src/nodes/strings.js in prettier-1.0.0.pre.rc2 vs src/nodes/strings.js in prettier-1.0.0

- old
+ new

@@ -30,10 +30,10 @@ } const quotePattern = new RegExp("\\\\([\\s\\S])|(['\"])", "g"); function normalizeQuotes(content, enclosingQuote, originalQuote) { - const replaceOther = ["'", '"'].includes(originalQuote); + const replaceOther = originalQuote === '"'; const otherQuote = enclosingQuote === '"' ? "'" : '"'; // Escape and unescape single and double quotes as needed to be able to // enclose `content` with `enclosingQuote`. return content.replace(quotePattern, (match, escaped, quote) => {