mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 22:23:59 +01:00
parent
b6bf66dcc7
commit
e48d967b4b
|
@ -125,7 +125,8 @@ const ContentView = React.memo(
|
||||||
|
|
||||||
const match = /language-(\w+)/.exec(className || '');
|
const match = /language-(\w+)/.exec(className || '');
|
||||||
const lang = match && match[1];
|
const lang = match && match[1];
|
||||||
if (lang)
|
const isMatch = lang && hljs.getLanguage(lang);
|
||||||
|
if (isMatch)
|
||||||
highlight = hljs.highlight(children.toString(), {
|
highlight = hljs.highlight(children.toString(), {
|
||||||
language: lang,
|
language: lang,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue