FIX: Do not treat code tag as block level element (#12432)

When syncing code elements, the inner text used to be escaped, which
rendered the actual HTML code instead. This commit overwrites default
parser settings to fix the way code tags are handled.
This commit is contained in:
Bianca Nenciu 2021-03-18 15:30:15 +02:00 committed by GitHub
parent cf703ccf66
commit 1a433193d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -416,7 +416,12 @@ export default Component.extend({
loadScript("/javascripts/diffhtml.min.js").then(() => {
window.diff.innerHTML(
this.element.querySelector(".d-editor-preview"),
cookedElement.innerHTML
cookedElement.innerHTML,
{
parser: {
rawElements: ["script", "noscript", "style", "template"],
},
}
);
});
}