blah use async

pull/2368/head
John McLear 2014-12-08 19:44:40 +00:00
parent 7cf0e4a9ae
commit f2c155ee1a
1 changed files with 28 additions and 28 deletions

View File

@ -426,37 +426,37 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
if(ERR(err, callback)) return; if(ERR(err, callback)) return;
// Include some Styles into the Head for Export // Include some Styles into the Head for Export
var stylesForExport = hooks.callAllStr("stylesForExport", padId) || '' hooks.aCallAll("stylesForExport", padId, function(err, stylesForExport){
var head = // Core inclusion of head etc.
(noDocType ? '' : '<!doctype html>\n') + var head =
'<html lang="en">\n' + (noDocType ? '' : '<head>\n' + (noDocType ? '' : '<!doctype html>\n') +
'<title>' + Security.escapeHTML(padId) + '</title>\n' + '<html lang="en">\n' + (noDocType ? '' : '<head>\n' +
'<meta charset="utf-8">\n' + '<title>' + Security.escapeHTML(padId) + '</title>\n' +
'<style> * { font-family: arial, sans-serif;\n' + '<meta charset="utf-8">\n' +
'font-size: 13px;\n' + '<style> * { font-family: arial, sans-serif;\n' +
'line-height: 17px; }' + 'font-size: 13px;\n' +
'ul.indent { list-style-type: none; }' + 'line-height: 17px; }' +
'ol { list-style-type: decimal; }' + 'ul.indent { list-style-type: none; }' +
'ol ol { list-style-type: lower-latin; }' + 'ol { list-style-type: decimal; }' +
'ol ol ol { list-style-type: lower-roman; }' + 'ol ol { list-style-type: lower-latin; }' +
'ol ol ol ol { list-style-type: decimal; }' + 'ol ol ol { list-style-type: lower-roman; }' +
'ol ol ol ol ol { list-style-type: lower-latin; }' + 'ol ol ol ol { list-style-type: decimal; }' +
'ol ol ol ol ol ol{ list-style-type: lower-roman; }' + 'ol ol ol ol ol { list-style-type: lower-latin; }' +
'ol ol ol ol ol ol ol { list-style-type: decimal; }' + 'ol ol ol ol ol ol{ list-style-type: lower-roman; }' +
'ol ol ol ol ol ol ol ol{ list-style-type: lower-latin; }' + 'ol ol ol ol ol ol ol { list-style-type: decimal; }' +
stylesForExport + 'ol ol ol ol ol ol ol ol{ list-style-type: lower-latin; }' +
'</style>\n' + '</head>\n') + stylesForExport +
'<body>'; '</style>\n' + '</head>\n') +
'<body>';
var foot = '</body>\n</html>\n';
var foot = '</body>\n</html>\n'; getPadHTML(pad, revNum, function (err, html)
{
getPadHTML(pad, revNum, function (err, html) if(ERR(err, callback)) return;
{ callback(null, head + html + foot);
if(ERR(err, callback)) return; });
callback(null, head + html + foot);
}); });
}); });
}; };