mirror of
https://github.com/jsbin/jsbin.git
synced 2026-02-01 16:46:05 +00:00
abstract tags to separate variable
This commit is contained in:
parent
73554f8a8e
commit
c1c78c1e1c
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user