summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/main.lua
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-12 18:57:21 +0200
committermadmaxoft <github@xoft.cz>2013-09-12 18:57:21 +0200
commit5b8271517d2f07ec00b13fca2c29c868c6e709ff (patch)
treecb8a2f2dc0dd63f832085c95b4523076bd8c98d0 /MCServer/Plugins/APIDump/main.lua
parentAPIDump: Fixed parsing tables with wiki-links. (diff)
downloadcuberite-5b8271517d2f07ec00b13fca2c29c868c6e709ff.tar
cuberite-5b8271517d2f07ec00b13fca2c29c868c6e709ff.tar.gz
cuberite-5b8271517d2f07ec00b13fca2c29c868c6e709ff.tar.bz2
cuberite-5b8271517d2f07ec00b13fca2c29c868c6e709ff.tar.lz
cuberite-5b8271517d2f07ec00b13fca2c29c868c6e709ff.tar.xz
cuberite-5b8271517d2f07ec00b13fca2c29c868c6e709ff.tar.zst
cuberite-5b8271517d2f07ec00b13fca2c29c868c6e709ff.zip
Diffstat (limited to 'MCServer/Plugins/APIDump/main.lua')
-rw-r--r--MCServer/Plugins/APIDump/main.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua
index c5d251445..188c6452f 100644
--- a/MCServer/Plugins/APIDump/main.lua
+++ b/MCServer/Plugins/APIDump/main.lua
@@ -357,6 +357,9 @@ function ConvertWikiToDesc()
local Constants = {};
local Functions = {};
for line in fin:lines() do
+ -- Replace wiki-style markup:
+ line = line:gsub("%[%[.-:.-:(.-)|(.-)%]%]", "{{%1|%2}}"); -- Replaces [[API:Plugin:Hook|LinkText]]
+ line = line:gsub("%[%[.-:(.-)|(.-)%]%]", "{{%1|%2}}"); -- Replaces [[API:Class|LinkText]]
if (line:find("======") ~= nil) then
state = 1; -- The following is the class description
ClassName = line:gsub("======", "");