send fallback in pre tags, not code

This commit is contained in:
Aleks Kissinger 2020-09-20 16:52:29 +01:00
parent 428a6b94ff
commit e4448ae1ad

View file

@ -53,9 +53,9 @@ export function htmlSerializeIfNeeded(model: EditorModel, {forceHTML = false} =
md = md.replace(reg, function(match, p1) { md = md.replace(reg, function(match, p1) {
const p1e = AllHtmlEntities.encode(p1); const p1e = AllHtmlEntities.encode(p1);
if (d.display == true) { if (d.display == true) {
return `<div data-mx-maths="${p1e}"><code>${p1e}</code></div>`; return `<div data-mx-maths="${p1e}"><pre>${p1e}</pre></div>`;
} else { } else {
return `<span data-mx-maths="${p1e}"><code>${p1e}</code></span>`; return `<span data-mx-maths="${p1e}"><pre>${p1e}</pre></span>`;
} }
}); });
}); });