summaryrefslogtreecommitdiff
path: root/script-beta/provider/markdown.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-10 16:52:38 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-10 16:52:38 +0800
commit0f906e0a58328d5b3400a6645bec759198e5f469 (patch)
treeb09763e7f98e58f2b4db03c2306b83115a7599ac /script-beta/provider/markdown.lua
parent8263a6756b5107ee6a8c99f833fbd4d709bea73a (diff)
downloadlua-language-server-0f906e0a58328d5b3400a6645bec759198e5f469.zip
markdown的换行要2个换行符
Diffstat (limited to 'script-beta/provider/markdown.lua')
-rw-r--r--script-beta/provider/markdown.lua4
1 files changed, 4 insertions, 0 deletions
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()