chore: fix highlight code

This commit is contained in:
Steven
2024-02-06 20:59:17 +08:00
parent ded8001735
commit a76b86f18a

View File

@ -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") {