From b93c215e8e32e4537423bb48f20dbb58e7af4cc0 Mon Sep 17 00:00:00 2001 From: Brett Crowell Date: Wed, 19 Apr 2017 16:02:01 -0400 Subject: [PATCH] treat input as single-line when parsing tags + tests --- lib/parse-tag.js | 2 +- test/parse-tag.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/parse-tag.js b/lib/parse-tag.js index d1c1c9f..94650a1 100644 --- a/lib/parse-tag.js +++ b/lib/parse-tag.js @@ -1,4 +1,4 @@ -var attrRE = /([\w-]+)|(['"])(.*?)\2/g; +var attrRE = /([\w-]+)|(['"])([.\s\S]*?)\2/g; // create optimized lookup object for // void elements as listed here: diff --git a/test/parse-tag.js b/test/parse-tag.js index 157dfa5..2c98cc4 100644 --- a/test/parse-tag.js +++ b/test/parse-tag.js @@ -66,6 +66,19 @@ test('parseTag', function (t) { voidElement: false, children: [] }); + + tag = '