summaryrefslogtreecommitdiffstats
path: root/Server/Plugins/APIDump/main_APIDump.lua
diff options
context:
space:
mode:
authorNiLSPACE <NiLSPACE@users.noreply.github.com>2024-11-04 23:43:20 +0100
committerGitHub <noreply@github.com>2024-11-04 23:43:20 +0100
commita99c3ec2b8eb8d8f2223e8175790539a675ffcac (patch)
tree454cf6ce029f475eecdac6f913f6c7af84462b53 /Server/Plugins/APIDump/main_APIDump.lua
parentTemp fix for disappearing chunk sections in 1.14 (#5560) (diff)
downloadcuberite-a99c3ec2b8eb8d8f2223e8175790539a675ffcac.tar
cuberite-a99c3ec2b8eb8d8f2223e8175790539a675ffcac.tar.gz
cuberite-a99c3ec2b8eb8d8f2223e8175790539a675ffcac.tar.bz2
cuberite-a99c3ec2b8eb8d8f2223e8175790539a675ffcac.tar.lz
cuberite-a99c3ec2b8eb8d8f2223e8175790539a675ffcac.tar.xz
cuberite-a99c3ec2b8eb8d8f2223e8175790539a675ffcac.tar.zst
cuberite-a99c3ec2b8eb8d8f2223e8175790539a675ffcac.zip
Diffstat (limited to '')
-rw-r--r--Server/Plugins/APIDump/main_APIDump.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/Server/Plugins/APIDump/main_APIDump.lua b/Server/Plugins/APIDump/main_APIDump.lua
index 735a6ec05..5d6f5255f 100644
--- a/Server/Plugins/APIDump/main_APIDump.lua
+++ b/Server/Plugins/APIDump/main_APIDump.lua
@@ -136,7 +136,7 @@ local function CreateAPITables()
return res;
end
- for i, v in pairs(_G) do
+ for i, v in pairs(getmetatable(_G).__index) do
if (
(v ~= _G) and -- don't want the global namespace
(v ~= _G.packages) and -- don't want any packages
@@ -1473,7 +1473,7 @@ end
--- Returns the string with extra tabs and CR/LFs removed
-local function CleanUpDescription(a_Desc)
+function CleanUpDescription(a_Desc)
-- Get rid of indent and newlines, normalize whitespace:
local res = a_Desc:gsub("[\n\t]", "")
res = a_Desc:gsub("%s%s+", " ")
@@ -1858,6 +1858,9 @@ local function DumpApi()
-- Dump all available API objects in format used by ZeroBraneStudio API descriptions:
DumpAPIZBS(API)
+ -- Dump all available API objects in format used by Lua-Language-Server API descriptions:
+ DumpAPILLS(API);
+
-- Export the API in a format used by LuaCheck
DumpLuaCheck(API)