Skip to content

Commit

Permalink
fix: ignore regex handling
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 26, 2024
1 parent f79a2d8 commit 6e90de3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/case-police/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function replaceCore(
) {
regex = regex || buildRegex(dict)
Array.from(code.matchAll(IGNORE_REGEX)).forEach((match) => {
const [, key] = match
const key = match[1].trim().replace(/\s*-->$/, '') // remove comment end
ignore.push(...key.split(',').map(k => k.trim().toLowerCase()).filter(Boolean))
})

Expand Down

0 comments on commit 6e90de3

Please sign in to comment.