mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:22:46 +08:00
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:
parent
cf703ccf66
commit
1a433193d1
|
@ -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"],
|
||||
},
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user