mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: fix highlight code
This commit is contained in:
@ -12,7 +12,7 @@ interface Props extends BaseProps {
|
|||||||
|
|
||||||
const CodeBlock: React.FC<Props> = ({ language, content }: Props) => {
|
const CodeBlock: React.FC<Props> = ({ language, content }: Props) => {
|
||||||
const formatedLanguage = (language || "").toLowerCase() || "text";
|
const formatedLanguage = (language || "").toLowerCase() || "text";
|
||||||
let highlightedCode = hljs.highlightAuto(content).value;
|
let highlightedCode = content;
|
||||||
|
|
||||||
// Users can set Markdown code blocks as `__html` to render HTML directly.
|
// Users can set Markdown code blocks as `__html` to render HTML directly.
|
||||||
if (formatedLanguage === "__html") {
|
if (formatedLanguage === "__html") {
|
||||||
|
Reference in New Issue
Block a user