From 520088fc7c71818bb0988063a19e45b3577541d5 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 23 Nov 2013 19:40:35 +0100 Subject: APIDump: Added more constant groups. Also fixed the parsing of the Include data in the constant groups, and added linkification to group texts. --- MCServer/Plugins/APIDump/main_APIDump.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'MCServer/Plugins/APIDump/main_APIDump.lua') 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("

Constants inherited from ", a_InheritedName, "

\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("

"); - 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 "", "

"); + cf:write(LinkifyString(group.TextAfter or "", Source), "

"); end end end -- cgit v1.2.3