✨ Configure highlight.js to handle HTML safely with updated settings
This commit is contained in:
@@ -22,6 +22,8 @@ function applyHighlight(el, theme = 'github-dark') {
|
||||
}
|
||||
|
||||
try {
|
||||
// Configure highlight.js to handle HTML safely
|
||||
hljs.configure({ useBR: false });
|
||||
hljs.highlightElement(el);
|
||||
// Remove any existing theme classes
|
||||
el.className = el.className.replace(/hljs-theme-\w+/, '');
|
||||
|
||||
Reference in New Issue
Block a user