Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: codeblock renderer (#924)

boojacke29924c8a10e
diff --git a/web/src/labs/marked/parser/CodeBlock.tsx b/web/src/labs/marked/parser/CodeBlock.tsx
index 231033ca4..f1d7912c4 100644
--- a/web/src/labs/marked/parser/CodeBlock.tsx
+++ b/web/src/labs/marked/parser/CodeBlock.tsx
@@ -38,7 +38,7 @@ const renderer = (rawStr: string) => {
>
copy
</button>
- <code className={`language-${language}`}>{highlightedCode}</code>
+ <code className={`language-${language}`} dangerouslySetInnerHTML={{ __html: highlightedCode }}></code>
</pre>
);
};