Skip to content

Commit

Permalink
fix(preset-attributify): try to break out of unmatched regex
Browse files Browse the repository at this point in the history
  • Loading branch information
chu121su12 committed Jan 30, 2023
1 parent 33290b6 commit af5cbde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/preset-attributify/src/extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const strippedPrefixes = [
]

const splitterRE = /[\s'"`;]+/g
const elementRE = /<\w(?=.*>)[\w:\.$-]*\s((?:['"`\{].*?['"`\}]|.*?)*?)>/gs
const elementRE = /<\w(?=.*>)[\w:\.$-]*\s((?:['"`\{].*?['"`\}]|.*?(?!\Z))*?)>/gs
const valuedAttributeRE = /([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms

export const defaultIgnoreAttributes = ['placeholder', 'fill', 'opacity']
Expand Down

0 comments on commit af5cbde

Please sign in to comment.