abstract tags to separate variable

This commit is contained in:
Fabien O'Carroll 2014-04-28 10:43:41 +01:00
parent 73554f8a8e
commit c1c78c1e1c

View File

@ -65,12 +65,16 @@ var createFileFromBin = (function closure() {
var processors = bin.processors;
var doctype = (html.match(regex.doctype) || [])[0] || defaults.doctype;
var htmlTag = '<html>';
var headTag = '<head>';
var bodyTag = '<body>';
var headContents = getHeadContents(html);
var bodyContents = getBodyContents(html);
file += doctype + '\n';
file += '<html>\n<head>\n';
file += headContents + '\n</head>\n<body>\n';
file += htmlTag + '\n' + headTag + '\n';
file += headContents + '\n</head>\ni' + bodyTag + '\n';
file += bodyContents + '\n</body>\n</html>';
file = file.replace('%css%', bin.css);