mirror of
https://github.com/usememos/memos.git
synced 2025-10-11 06:47:04 +08:00
chore: fix highlight code
This commit is contained in:
parent
ded8001735
commit
a76b86f18a
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue