mirror of
https://github.com/usememos/memos.git
synced 2024-12-24 11:44:44 +03:00
fix: markdown support in blockquote (#1394)
This commit is contained in:
parent
af3d3c2c9b
commit
026fb3e50e
@ -1,3 +1,5 @@
|
|||||||
|
import { inlineElementParserList } from ".";
|
||||||
|
import { marked } from "..";
|
||||||
import { matcher } from "../matcher";
|
import { matcher } from "../matcher";
|
||||||
|
|
||||||
export const BLOCKQUOTE_REG = /^> ([^\n]+)/;
|
export const BLOCKQUOTE_REG = /^> ([^\n]+)/;
|
||||||
@ -8,7 +10,8 @@ const renderer = (rawStr: string) => {
|
|||||||
return <>{rawStr}</>;
|
return <>{rawStr}</>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <blockquote>{matchResult[1]}</blockquote>;
|
const parsedContent = marked(matchResult[1], [], inlineElementParserList);
|
||||||
|
return <blockquote>{parsedContent}</blockquote>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Loading…
Reference in New Issue
Block a user