mirror of
https://github.com/danbulant/node-html-parser
synced 2026-06-20 07:01:57 +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;
|
const re = /\b([a-z][a-z0-9\-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/ig;
|
||||||
let match: RegExpExecArray;
|
let match: RegExpExecArray;
|
||||||
while (match = re.exec(this.rawAttrs)) {
|
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;
|
this._rawAttrs = attrs;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue