Skip to content

Commit

Permalink
Remove legacy replace behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Dec 10, 2019
1 parent a0e39bb commit 4441976
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ export function expandLiteralStrings(data: string) {
const firstDoubleQuoteIdx = string.indexOf('"');
const colonAndAnySpacing = string.slice(0, firstDoubleQuoteIdx);
const rawStringifiedValue = string.slice(firstDoubleQuoteIdx, string.length);
const jsonValue = JSON.parse(rawStringifiedValue)
.replace('^\s*\n', '') // prettier-ignore
.replace('\n\s*$', ''); // prettier-ignore
// Remove one level of JSON stringificaiton
const jsonValue = JSON.parse(rawStringifiedValue);
return `${colonAndAnySpacing}"""${jsonValue}"""`;
} else {
return string;
Expand Down

0 comments on commit 4441976

Please sign in to comment.