From 805f972c424805c361a7cc12d1752c7a23d533f6 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, 31 May 2022 01:03:33 +0800 Subject: update API for `love2d` and `lovr` --- tools/love-api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/love-api.lua') 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 -- cgit v1.2.3