summaryrefslogtreecommitdiff
path: root/tools/love-api.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-05-31 01:03:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-05-31 01:03:33 +0800
commit805f972c424805c361a7cc12d1752c7a23d533f6 (patch)
tree6b2f078a3ebd05ed14066b65adf7772d1f3c5536 /tools/love-api.lua
parent7162bc37691916125ba5065c476c866693a39216 (diff)
downloadlua-language-server-805f972c424805c361a7cc12d1752c7a23d533f6.zip
update API for `love2d` and `lovr`
Diffstat (limited to 'tools/love-api.lua')
-rw-r--r--tools/love-api.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/love-api.lua b/tools/love-api.lua
index d72bc5c8..7300ccc3 100644
--- a/tools/love-api.lua
+++ b/tools/love-api.lua
@@ -128,7 +128,7 @@ local function buildDocFunc(variant, overload)
params[#params+1] = '...'
else
if param.name:find '^[\'"]' then
- params[#params+1] = ('%s%s: %s|%q'):format(param.name:sub(2, -2), getOptional(param), getTypeName(param.type), param.name)
+ params[#params+1] = ('%s%s: %s|%s'):format(param.name, getOptional(param), getTypeName(param.type), param.name)
else
params[#params+1] = ('%s%s: %s'):format(param.name, getOptional(param), getTypeName(param.type))
end
@@ -240,7 +240,7 @@ local function buildFile(class, defs)
text[#text+1] = ('---@alias %s'):format(getTypeName(enum.name))
for _, constant in ipairs(enum.constants) do
text[#text+1] = buildDescription(constant.description, constant.notes)
- text[#text+1] = ([[---| '%s']]):format(('%q'):format(constant.name):gsub("'", "\\'"))
+ text[#text+1] = ([[---| %q]]):format(constant.name)
end
end