summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-31 20:21:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-31 20:21:25 +0800
commitb562e8635c0a2435d34531452c4be3253b818fd0 (patch)
tree33766c5ea95ebab371ca2ed4879cb3831dc16839
parentf3a4da264086093b594222a47407c183327bbfd8 (diff)
downloadlua-language-server-b562e8635c0a2435d34531452c4be3253b818fd0.zip
improve markdown
-rw-r--r--script/provider/markdown.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/provider/markdown.lua b/script/provider/markdown.lua
index 50716073..fe1b26b2 100644
--- a/script/provider/markdown.lua
+++ b/script/provider/markdown.lua
@@ -71,6 +71,10 @@ function mt:string(nl)
elseif obj.type == 'emptyline' then
if #lines > 0
and lines[#lines] ~= '' then
+ if language ~= 'md' then
+ language = 'md'
+ lines[#lines+1] = '```'
+ end
lines[#lines+1] = ''
end
elseif obj.type == 'markdown' then