Skip to content

Commit 1faa34b

Browse files
committed
Return a text node for just text passed
1 parent 2eb6955 commit 1faa34b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/parse.js

+5
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,10 @@ module.exports = function parse(html, options) {
8989
}
9090
});
9191

92+
// If the "html" passed isn't actually html, add it as a text node.
93+
if (!result.length && html.length) {
94+
pushTextNode(result, html, 0, options.ignoreWhitespace);
95+
}
96+
9297
return result;
9398
};

0 commit comments

Comments
 (0)