Skip to content

Commit

Permalink
fix: skip printable ASCII symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Sep 19, 2023
1 parent 5f49aa2 commit e7739a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rewrite-pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,8 @@ const processTerm = (item, regenerateOptions, groups) => {
break;
case 'value':
const codePoint = item.codePoint;
if (item.kind === "symbol" && codePoint < 0x80) {
// skip regenerate when it is an ASCII symbol
if (item.kind === "symbol" && codePoint >= 0x20 && codePoint <= 0x7E) {
// skip regenerate when it is a printable ASCII symbol
break;
}
const set = regenerate(codePoint);
Expand Down

0 comments on commit e7739a1

Please sign in to comment.