mirror of
https://github.com/usememos/memos.git
synced 2025-10-25 05:46:03 +08:00
fix: markdown support in blockquote (#1394)
This commit is contained in:
parent
af3d3c2c9b
commit
026fb3e50e
1 changed files with 4 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue