From f13fbed3ce0247e55561b3dbe35819c672958cd7 Mon Sep 17 00:00:00 2001 From: cel Date: Sun, 7 May 2017 09:29:25 -1000 Subject: Add back doctype --- lib/util.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/util.js b/lib/util.js index 6a419f9..fe5b4f3 100644 --- a/lib/util.js +++ b/lib/util.js @@ -38,7 +38,9 @@ u.toHTML = function (el) { if (typeof el === 'string' || Array.isArray(el)) { return h('div', el).innerHTML } - return el.outerHTML || String(el) + var html = el.outerHTML || String(el) + if (el.nodeName === 'html') html = '' + html + '\n' + return html } u.hyperwrap = function (fn) { -- cgit v1.2.3