From a1068b6fe33cd79d4157d232cf8cf1681694192c Mon Sep 17 00:00:00 2001 From: Mahoo Huang <45908451+Mahoo12138@users.noreply.github.com> Date: Wed, 2 Nov 2022 20:33:25 +0800 Subject: [PATCH] fix: abnormal blockquote regexp (#404) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ```markdown 面向具体实现编程 ==> 面向抽象接口编程 ```. 面向具体实现编程 == > 面向抽象接口编程 --- web/src/labs/marked/parser/Blockquote.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/labs/marked/parser/Blockquote.ts b/web/src/labs/marked/parser/Blockquote.ts index de18f4a2..a30fe6f1 100644 --- a/web/src/labs/marked/parser/Blockquote.ts +++ b/web/src/labs/marked/parser/Blockquote.ts @@ -1,6 +1,6 @@ import { escape } from "lodash"; -export const BLOCKQUOTE_REG = /> ([\S ]+)(\n?)/; +export const BLOCKQUOTE_REG = /^>\s+([\S ]+)(\n?)/; const renderer = (rawStr: string): string => { const matchResult = rawStr.match(BLOCKQUOTE_REG);