summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/main_APIDump.lua
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-23 19:40:35 +0100
committermadmaxoft <github@xoft.cz>2013-11-23 19:40:35 +0100
commit520088fc7c71818bb0988063a19e45b3577541d5 (patch)
tree636304f87b04e081c08d658957e299dba722e119 /MCServer/Plugins/APIDump/main_APIDump.lua
parentAPIDump: Added a few constant groups to the descriptions. (diff)
downloadcuberite-520088fc7c71818bb0988063a19e45b3577541d5.tar
cuberite-520088fc7c71818bb0988063a19e45b3577541d5.tar.gz
cuberite-520088fc7c71818bb0988063a19e45b3577541d5.tar.bz2
cuberite-520088fc7c71818bb0988063a19e45b3577541d5.tar.lz
cuberite-520088fc7c71818bb0988063a19e45b3577541d5.tar.xz
cuberite-520088fc7c71818bb0988063a19e45b3577541d5.tar.zst
cuberite-520088fc7c71818bb0988063a19e45b3577541d5.zip
Diffstat (limited to 'MCServer/Plugins/APIDump/main_APIDump.lua')
-rw-r--r--MCServer/Plugins/APIDump/main_APIDump.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua
index 4dcedc06e..9c4fb17f8 100644
--- a/MCServer/Plugins/APIDump/main_APIDump.lua
+++ b/MCServer/Plugins/APIDump/main_APIDump.lua
@@ -576,7 +576,7 @@ function ReadDescriptions(a_API)
for j, group in pairs(APIDesc.ConstantGroups) do
group.Name = j;
group.Constants = {};
- if (type(group.Include == "string")) then
+ if (type(group.Include) == "string") then
group.Include = { group.Include };
end
local NumInGroup = 0;
@@ -820,20 +820,22 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
return;
end
+ local Source = a_ClassAPI.Name
if (a_InheritedName ~= nil) then
cf:write("<h2>Constants inherited from ", a_InheritedName, "</h2>\n");
+ Source = a_InheritedName;
end
if (#a_Constants > 0) then
- WriteConstantTable(a_Constants, a_InheritedName or a_ClassAPI.Name);
+ WriteConstantTable(a_Constants, Source);
end
for k, group in pairs(a_ConstantGroups) do
if ((a_InheritedName == nil) or group.ShowInDescendants) then
cf:write("<a name='", group.Name, "'><p>");
- cf:write(group.TextBefore or "");
+ cf:write(LinkifyString(group.TextBefore or "", Source));
WriteConstantTable(group.Constants, a_InheritedName or a_ClassAPI.Name);
- cf:write(group.TextAfter or "", "</a></p>");
+ cf:write(LinkifyString(group.TextAfter or "", Source), "</a></p>");
end
end
end