Skip to content

Commit c7ba274

Browse files
authored
Allow underscore in html.ts attribute parsing
1 parent faece14 commit c7ba274

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nodes/html.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ export default class HTMLElement extends Node {
687687
}
688688
const attrs = {} as RawAttributes;
689689
if (this.rawAttrs) {
690-
const re = /([a-zA-Z()#][a-zA-Z0-9-_:()#]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
690+
const re = /([a-zA-Z()#_][a-zA-Z0-9-_:()#]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
691691
let match: RegExpExecArray;
692692
while ((match = re.exec(this.rawAttrs))) {
693693
const key = match[1];

0 commit comments

Comments
 (0)