mirror of https://github.com/usememos/memos.git
chore: fix highlight code
This commit is contained in:
parent
ded8001735
commit
a76b86f18a
|
|
@ -12,7 +12,7 @@ interface Props extends BaseProps {
|
|||
|
||||
const CodeBlock: React.FC<Props> = ({ language, content }: Props) => {
|
||||
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.
|
||||
if (formatedLanguage === "__html") {
|
||||
|
|
|
|||
Loading…
Reference in New Issue