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