We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aeb413e commit 6b499c6Copy full SHA for 6b499c6
lib/parse.js
@@ -15,6 +15,13 @@ module.exports = function parse(html, options) {
15
var byTag = {};
16
var inComponent = false;
17
18
+ if (!new RegExp(tagRE).test(html)) {
19
+ result.push({
20
+ type: 'text',
21
+ content: html
22
+ });
23
+ }
24
+
25
html.replace(tagRE, function (tag, index) {
26
if (inComponent) {
27
if (tag !== ('</' + current.name + '>')) {
test/parse.js
@@ -382,7 +382,7 @@ test('parse', function (t) {
382
var name = splitted[0];
383
}
384
}();
385
- </script>`
+ </script>`;
386
parsed = HTML.parse(html);
387
t.deepEqual(parsed, [{
388
type: 'tag',
0 commit comments