Skip to content

Commit

Permalink
fix: Last scaped brackets were not unscaped
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Moreno committed Jan 13, 2021
1 parent 087ec1f commit db2f768
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/macro/src/macroJs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { COMMENT, ID, MESSAGE, EXTRACT_MARK } from "./constants"

const keepSpaceRe = /(?:\\(?:\r\n|\r|\n))+\s+/g
const keepNewLineRe = /(?:\r\n|\r|\n)+\s+/g
const removeExtraScapedLiterals = /(?:\\(.))/
const removeExtraScapedLiterals = /(?:\\(.))/g

function normalizeWhitespace(text) {
return text.replace(keepSpaceRe, " ").replace(keepNewLineRe, "\n").trim()
Expand Down

1 comment on commit db2f768

@vercel
Copy link

@vercel vercel bot commented on db2f768 Jan 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.