some demo export loic for handling OL incrementation

pull/2420/head
John McLear 2014-12-30 14:43:00 +01:00
parent 7980381369
commit 16713d8b3b
1 changed files with 27 additions and 17 deletions

View File

@ -449,22 +449,33 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
'font-size: 13px;\n' + 'font-size: 13px;\n' +
'line-height: 17px; }' + 'line-height: 17px; }' +
'ul.indent { list-style-type: none; }' + 'ul.indent { list-style-type: none; }' +
'ol { list-style-type: decimal; }' +
'ol ol { list-style-type: lower-latin; }' + 'ol { list-style-type: none; }' +
'ol ol ol { list-style-type: lower-roman; }' + 'body > ol { counter-reset: first second; }' +
'ol ol ol ol { list-style-type: decimal; }' + 'ol > li:before {' +
'ol ol ol ol ol { list-style-type: lower-latin; }' + 'content: counter(first) ". " ;'+
'ol ol ol ol ol ol{ list-style-type: lower-roman; }' + 'counter-increment: first;}' +
'ol ol ol ol ol ol ol { list-style-type: decimal; }' +
'ol ol ol ol ol ol ol ol{ list-style-type: lower-latin; }' + 'ol > li > ol > li:before {' +
'ol ol ol ol ol ol ol ol ol { list-style-type: decimal; }' + 'content: counter(first) "." counter(second) ". " ;'+
'ol ol ol ol ol ol ol ol ol ol { list-style-type: lower-latin; }' + 'counter-increment: second;}' +
'ol ol ol ol ol ol ol ol ol ol ol { list-style-type: lower-roman; }' +
'ol ol ol ol ol ol ol ol ol ol ol ol { list-style-type: decimal; }' + 'ol > li > ol > li > ol > li:before {' +
'ol ol ol ol ol ol ol ol ol ol ol ol ol { list-style-type: lower-latin; }' + 'content: counter(first) "." counter(second) "." counter(third) ". ";'+
'ol ol ol ol ol ol ol ol ol ol ol ol ol ol{ list-style-type: lower-roman; }' + 'counter-increment: third;}' +
'ol ol ol ol ol ol ol ol ol ol ol ol ol ol ol { list-style-type: decimal; }' +
'ol ol ol ol ol ol ol ol ol ol ol ol ol ol ol ol{ list-style-type: lower-latin; }' + 'ol > li > ol > li > ol > li > ol > li:before {' +
'content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) ". ";'+
'counter-increment: fourth;}' +
'ol > li > ol > li > ol > li > ol > li > ol > li:before {' +
'content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) ". ";'+
'counter-increment: fifth;}' +
'ol > li > ol > li > ol > li > ol > li > ol > li > ol > li:before {' +
'content: counter(first) "." counter(second) "." counter(third) "." counter(fourth) "." counter(fifth) "." counter(sixth) ". ";'+
'counter-increment: sixth;}' +
stylesForExportCSS + stylesForExportCSS +
'</style>\n' + '</head>\n') + '</style>\n' + '</head>\n') +
'<body>'; '<body>';
@ -479,7 +490,6 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
}); });
}; };
// copied from ACE // copied from ACE
var _REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/; var _REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/;
var _REGEX_SPACE = /\s/; var _REGEX_SPACE = /\s/;