summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-08 16:35:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-08 16:35:42 +0800
commit4e8b4f2c841a571680b26bc27fdb805b4a5e0a51 (patch)
tree0fc48c324f23ac4ed0619906bcb21a02aafdf831
parente5f5d4251beaf882f6b125ce7552127b9ea21240 (diff)
downloadlua-language-server-4e8b4f2c841a571680b26bc27fdb805b4a5e0a51.zip
fix wrong link for document, e.g. `file:seek`
-rw-r--r--script/library.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/library.lua b/script/library.lua
index a7b06e97..b460daf7 100644
--- a/script/library.lua
+++ b/script/library.lua
@@ -50,7 +50,7 @@ end
local function convertLink(uri, text)
local fmt = getDocFormater(uri)
- return text:gsub('%$([%.%w]+)', function (name)
+ return text:gsub('%$([%.%w_%:]+)', function (name)
local lastDot = ''
if name:sub(-1) == '.' then
name = name:sub(1, -2)
@@ -80,7 +80,7 @@ local function createViewDocument(name)
if not fmt then
return nil
end
- name = name:match '[%w_%.]+'
+ name = name:match '[%w_%.%:]+'
if name:sub(-1) == '.' then
name = name:sub(1, -2)
end