Skip to content

Commit

Permalink
fix: match attributes without quotation marks
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejcodes committed Aug 23, 2023
1 parent 2973cd1 commit 1fa9a17
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 @@ -782,7 +782,7 @@ export class MinzeElement extends HTMLElement {
type onEvent = [attribute: string, event: string, callback: string]

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

0 comments on commit 1fa9a17

Please sign in to comment.