I am running highlight.js in the WordPress block editor and set highlight.js to run when core/code block is updated. The core/code block natively uses <br data-rich-text-line-break="true"> for it's line breaks. But when highlight.js runs it removes the line breaks.
Before:
After:
I tried using the highlight.js ignoreUnescapedHtML function:
//Define a custom function to exclude specific elements
hljs.configure({
ignoreUnescapedHTML: /<br\/?>/i, // Ignore <br> and <br/> tags
});
But could not get to work. https://highlightjs.readthedocs.io/en/latest/api.html



