mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: implement auto link parser
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import {
|
||||
AutoLinkNode,
|
||||
BlockquoteNode,
|
||||
BoldItalicNode,
|
||||
BoldNode,
|
||||
@ -20,6 +21,7 @@ import {
|
||||
TextNode,
|
||||
UnorderedListNode,
|
||||
} from "@/types/proto/api/v2/markdown_service";
|
||||
import AutoLink from "./AutoLink";
|
||||
import Blockquote from "./Blockquote";
|
||||
import Bold from "./Bold";
|
||||
import BoldItalic from "./BoldItalic";
|
||||
@ -78,6 +80,8 @@ const Renderer: React.FC<Props> = ({ node }: Props) => {
|
||||
return <Image {...(node.imageNode as ImageNode)} />;
|
||||
case NodeType.LINK:
|
||||
return <Link {...(node.linkNode as LinkNode)} />;
|
||||
case NodeType.AUTO_LINK:
|
||||
return <AutoLink {...(node.autoLinkNode as AutoLinkNode)} />;
|
||||
case NodeType.TAG:
|
||||
return <Tag {...(node.tagNode as TagNode)} />;
|
||||
case NodeType.STRIKETHROUGH:
|
||||
|
Reference in New Issue
Block a user