Skip to content

Commit

Permalink
fix: on:events regex notation
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejcodes committed Nov 28, 2023
1 parent 432169e commit 71d53ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/minze/src/lib/minze-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ export class MinzeElement extends HTMLElement {

// get all on:event attributes and remove duplicates
const onEventsRE =
/\s(?:on:|@)([\w\-:.]+)(?:=(?:"|')?(\w+)(?:"|')?)?(\s|\/)/gi
/(?<=\s+)(?:on:|@)([\w\-:.]+)(?:=(?:"|')?(\w+)(?:"|')?)?(?=\s+|\/|>)/gi
const onEvents: onEvent[] = [
...new Set(
[...template.matchAll(onEventsRE)].map((m) =>
Expand Down

0 comments on commit 71d53ec

Please sign in to comment.