From c1c78c1e1cbf45b7316b3ec9e99dc821fd54af11 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Mon, 28 Apr 2014 10:43:41 +0100 Subject: [PATCH] abstract tags to separate variable --- lib/dropbox/createFileFromBin.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/dropbox/createFileFromBin.js b/lib/dropbox/createFileFromBin.js index 5fc4268c..20a51c9b 100644 --- a/lib/dropbox/createFileFromBin.js +++ b/lib/dropbox/createFileFromBin.js @@ -65,12 +65,16 @@ var createFileFromBin = (function closure() { var processors = bin.processors; var doctype = (html.match(regex.doctype) || [])[0] || defaults.doctype; + var htmlTag = ''; + var headTag = ''; + var bodyTag = ''; + var headContents = getHeadContents(html); var bodyContents = getBodyContents(html); file += doctype + '\n'; - file += '\n\n'; - file += headContents + '\n\n\n'; + file += htmlTag + '\n' + headTag + '\n'; + file += headContents + '\n\ni' + bodyTag + '\n'; file += bodyContents + '\n\n'; file = file.replace('%css%', bin.css);