don't collapse whitespace in extended paste mode
for pre tags
This commit is contained in:
parent
b17946b282
commit
e1338e8733
@ -340,8 +340,11 @@ var filterHTML = function (html, internal, extendedMode) {
|
||||
filterNode(top, extendedMode);
|
||||
}
|
||||
var outHtml = top.innerHTML;
|
||||
// remove newlines in HTML, as they break cloze deletions, and collapse whitespace
|
||||
outHtml = outHtml.replace(/[\n\t ]+/g, " ").trim();
|
||||
if (!extendedMode) {
|
||||
// collapse whitespace
|
||||
outHtml = outHtml.replace(/[\n\t ]+/g, " ");
|
||||
}
|
||||
outHtml = outHtml.trim();
|
||||
//console.log(`input html: ${html}`);
|
||||
//console.log(`outpt html: ${outHtml}`);
|
||||
return outHtml;
|
||||
|
Loading…
Reference in New Issue
Block a user