From 6aba0280bf88fa89e5e916b4d9e702bf60c10524 Mon Sep 17 00:00:00 2001 From: Minas Keshishyan Date: Mon, 3 Feb 2020 13:40:28 +0400 Subject: [PATCH] fix rawAttributes() --- src/nodes/html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodes/html.ts b/src/nodes/html.ts index 3ec4486..3d08e44 100644 --- a/src/nodes/html.ts +++ b/src/nodes/html.ts @@ -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;