mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 09:15:41 +03:00
Migrate highlight.js API call in TextualBody (#9923)
Co-authored-by: Michael Weimann <michaelw@matrix.org> Fixes https://github.com/vector-im/element-web/issues/22233
This commit is contained in:
parent
39f5fc034f
commit
97f6431d60
1 changed files with 1 additions and 1 deletions
|
@ -265,7 +265,7 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
|
|||
// We don't use highlightElement here because we can't force language detection
|
||||
// off. It should use the one we've found in the CSS class but we'd rather pass
|
||||
// it in explicitly to make sure.
|
||||
code.innerHTML = highlight.highlight(advertisedLang, code.textContent).value;
|
||||
code.innerHTML = highlight.highlight(code.textContent, { language: advertisedLang }).value;
|
||||
} else if (
|
||||
SettingsStore.getValue("enableSyntaxHighlightLanguageDetection") &&
|
||||
code.parentElement instanceof HTMLPreElement
|
||||
|
|
Loading…
Reference in a new issue