From 4e8b4f2c841a571680b26bc27fdb805b4a5e0a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 8 Nov 2022 16:35:42 +0800 Subject: fix wrong link for document, e.g. `file:seek` --- script/library.lua | 4 ++-- 1 file 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 -- cgit v1.2.3