summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/main.lua
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-13 11:22:27 +0200
committermadmaxoft <github@xoft.cz>2013-09-13 11:22:27 +0200
commit9352af683dfb6fc80847e2842aabf881d91df4c1 (patch)
treee65d25277c684fb673bf6a57f1411b12b3a2dd60 /MCServer/Plugins/APIDump/main.lua
parentAPIDump: Added descendants specified through inheritance. (diff)
downloadcuberite-9352af683dfb6fc80847e2842aabf881d91df4c1.tar
cuberite-9352af683dfb6fc80847e2842aabf881d91df4c1.tar.gz
cuberite-9352af683dfb6fc80847e2842aabf881d91df4c1.tar.bz2
cuberite-9352af683dfb6fc80847e2842aabf881d91df4c1.tar.lz
cuberite-9352af683dfb6fc80847e2842aabf881d91df4c1.tar.xz
cuberite-9352af683dfb6fc80847e2842aabf881d91df4c1.tar.zst
cuberite-9352af683dfb6fc80847e2842aabf881d91df4c1.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/main.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua
index 79559eab4..b16df3c04 100644
--- a/MCServer/Plugins/APIDump/main.lua
+++ b/MCServer/Plugins/APIDump/main.lua
@@ -295,10 +295,9 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
return;
end
+ -- Make a link out of anything with the special linkifying syntax {{link|title}}
local function LinkifyString(a_String)
- -- TODO: Make a link out of anything with the special linkifying syntax {{link|title}}
- -- a_String:gsub("{{([^|]*)|([^}])*}}", "<a href=\"%1\">%2</a>");
- return a_String;
+ return (a_String:gsub("{{([^|]*)|([^}]*)}}", "<a href=\"%1.html\">%2</a>")); -- The extra parenthesis remove the extra values returned by gsub()
end
-- Writes a table containing all functions in the specified list, with an optional "inherited from" header when a_InheritedName is valid
@@ -361,7 +360,7 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI)
cf:write("<a name=\"desc\"><h1>" .. a_ClassAPI.Name .. " class</h1></a>\n");
if (a_ClassAPI.Desc ~= nil) then
cf:write("<p>");
- cf:write(a_ClassAPI.Desc);
+ cf:write(LinkifyString(a_ClassAPI.Desc));
cf:write("</p>\n");
end;