mirror of
https://github.com/danbulant/node-html-parser
synced 2026-05-19 04:18:52 +00:00
fix rawAttributes()
This commit is contained in:
parent
2315ec89a2
commit
6aba0280bf
1 changed files with 1 additions and 1 deletions
|
|
@ -424,7 +424,7 @@ export default class HTMLElement extends Node {
|
|||
const re = /\b([a-z][a-z0-9\-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/ig;
|
||||
let match: RegExpExecArray;
|
||||
while (match = re.exec(this.rawAttrs)) {
|
||||
attrs[match[1]] = match[2] || null;
|
||||
attrs[match[1]] = match[2] || match[3] || match[4] || null;
|
||||
}
|
||||
}
|
||||
this._rawAttrs = attrs;
|
||||
|
|
|
|||
Loading…
Reference in a new issue