From 0f906e0a58328d5b3400a6645bec759198e5f469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 10 Oct 2020 16:52:38 +0800 Subject: =?UTF-8?q?markdown=E7=9A=84=E6=8D=A2=E8=A1=8C=E8=A6=812=E4=B8=AA?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/provider/markdown.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'script-beta/provider/markdown.lua') diff --git a/script-beta/provider/markdown.lua b/script-beta/provider/markdown.lua index 56e7d8f1..ca76ec89 100644 --- a/script-beta/provider/markdown.lua +++ b/script-beta/provider/markdown.lua @@ -7,10 +7,14 @@ function mt:add(language, text) return end if language == 'md' then + if self._last == 'md' then + self[#self+1] = '' + end self[#self+1] = text else self[#self+1] = ('```%s\n%s\n```'):format(language, text) end + self._last = language end function mt:string() -- cgit v1.2.3