From 6cb2f72aa6f17d6509e1882695f23eef34659218 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 27 Jul 2016 11:38:25 +0200 Subject: [PATCH] pretty print html during export if possible --- www/pad/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/pad/main.js b/www/pad/main.js index 2056cd4e5..31490a5ce 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -393,8 +393,9 @@ define([ Dom = Dom || (new DOMParser()).parseFromString(data,"text/html"); return ('\n' + '\n' + - Dom.head.outerHTML + '\n' + - Dom.body.outerHTML); + (typeof(Hyperjson.toString) === 'function'? + Hyperjson.toString(Hyperjson.fromDOM(Dom.body)): + Dom.head.outerHTML) + '\n'); }; var domFromHTML = function (html) {