Skip to content

Commit

Permalink
attributes workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
RJWadley committed Aug 18, 2022
1 parent efb8e91 commit a77b21d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export const normalizeRegex = (regex: string) => {
// xdigit
out = out.replace(/\[:xdigit:\]/g, "a-fA-F0-9");

// attrs/withConfig workaround
// replace (?<!\\G)(?<=`) with `
out = out.replace(/(?<!\\\\G)(?<=`)/g, "`");

console.log("Converted regex:", regex);
console.log("To:", out);

Expand Down

0 comments on commit a77b21d

Please sign in to comment.