diff --git a/plugin/gomark/parser/blockquote.go b/plugin/gomark/parser/blockquote.go index f318bfc4..8e508364 100644 --- a/plugin/gomark/parser/blockquote.go +++ b/plugin/gomark/parser/blockquote.go @@ -14,7 +14,7 @@ func NewBlockquoteParser() *BlockquoteParser { } func (*BlockquoteParser) Match(tokens []*tokenizer.Token) (int, bool) { - if len(tokens) < 4 { + if len(tokens) < 3 { return 0, false } if tokens[0].Type != tokenizer.GreaterThan || tokens[1].Type != tokenizer.Space { diff --git a/plugin/gomark/parser/blockquote_test.go b/plugin/gomark/parser/blockquote_test.go index d786f943..4eb43dd8 100644 --- a/plugin/gomark/parser/blockquote_test.go +++ b/plugin/gomark/parser/blockquote_test.go @@ -29,6 +29,20 @@ func TestBlockquoteParser(t *testing.T) { }, }, }, + { + text: "> 你好", + blockquote: &ast.Blockquote{ + Children: []ast.Node{ + &ast.Paragraph{ + Children: []ast.Node{ + &ast.Text{ + Content: "你好", + }, + }, + }, + }, + }, + }, { text: "> Hello\nworld", blockquote: &ast.Blockquote{ diff --git a/web/src/components/MemoContent/Blockquote.tsx b/web/src/components/MemoContent/Blockquote.tsx index baf22a08..2973118f 100644 --- a/web/src/components/MemoContent/Blockquote.tsx +++ b/web/src/components/MemoContent/Blockquote.tsx @@ -8,7 +8,7 @@ interface Props extends BaseProps { const Blockquote: React.FC = ({ children }: Props) => { return ( -
+
{children.map((child, index) => ( ))} diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index a9158e09..106bc4a0 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -368,6 +368,7 @@ const MemoEditor = (props: Props) => {
e.stopPropagation()}>
+ @@ -375,7 +376,6 @@ const MemoEditor = (props: Props) => { -