summaryrefslogtreecommitdiff
path: root/script-beta/provider/markdown.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-29 19:50:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-29 19:50:48 +0800
commit49a08a52831faa22fd45cb819a96ece41e538673 (patch)
treef39e3e8010a81530bdce553c1a0a445e5bd633db /script-beta/provider/markdown.lua
parented687309b9630ec655ca339bd6e3c1662d7381bc (diff)
downloadlua-language-server-49a08a52831faa22fd45cb819a96ece41e538673.zip
补充2个小功能
Diffstat (limited to 'script-beta/provider/markdown.lua')
-rw-r--r--script-beta/provider/markdown.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script-beta/provider/markdown.lua b/script-beta/provider/markdown.lua
index 7bd34444..658107ae 100644
--- a/script-beta/provider/markdown.lua
+++ b/script-beta/provider/markdown.lua
@@ -6,10 +6,10 @@ function mt:add(language, text)
if not text then
return
end
- if language == 'lua' then
- self[#self+1] = ('```lua\n%s\n```'):format(text)
+ if language == 'md' then
+ self[#self+1] = text
else
- self[#self+1] = text .. '\n'
+ self[#self+1] = ('```%s\n%s\n```'):format(language, text)
end
end