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: markdown support in blockquote (#1394)

Zeng1998026fb3e50e77
diff --git a/web/src/labs/marked/parser/Blockquote.tsx b/web/src/labs/marked/parser/Blockquote.tsx
index 5d1daf483..535c7ddc9 100644
--- a/web/src/labs/marked/parser/Blockquote.tsx
+++ b/web/src/labs/marked/parser/Blockquote.tsx
@@ -1,3 +1,5 @@
+import { inlineElementParserList } from ".";
+import { marked } from "..";
import { matcher } from "../matcher";
export const BLOCKQUOTE_REG = /^> ([^\n]+)/;
@@ -8,7 +10,8 @@ const renderer = (rawStr: string) => {
return <>{rawStr}</>;
}
- return <blockquote>{matchResult[1]}</blockquote>;
+ const parsedContent = marked(matchResult[1], [], inlineElementParserList);
+ return <blockquote>{parsedContent}</blockquote>;
};
export default {