From 51b02854f9f9dc597d095f14c1b05150edf604e4 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 24 Nov 2013 10:03:02 +0100 Subject: APIDump: Removed needless whitespace output. --- MCServer/Plugins/APIDump/main_APIDump.lua | 231 ++++++++++++++---------------- 1 file changed, 108 insertions(+), 123 deletions(-) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua index f77409f91..de4239f7e 100644 --- a/MCServer/Plugins/APIDump/main_APIDump.lua +++ b/MCServer/Plugins/APIDump/main_APIDump.lua @@ -289,50 +289,53 @@ function DumpAPIHtml() end f:write([[ - - + + MCServer API - Index - - + +
-
-

MCServer API - Index

-
-
-

The API reference is divided into the following sections:

- - - -
-

Class index

-

The following classes are available in the MCServer Lua scripting language:

- -
]]); cf:close(); end @@ -1052,27 +1046,26 @@ function WriteHtmlHook(a_Hook) end local HookName = a_Hook.DefaultFnName; - f:write([[ - - - MCServer API - ]] .. HookName .. [[ Hook + f:write([[ + + MCServer API - ]], HookName, [[ Hook - - + +
-
-

]] .. a_Hook.Name .. [[

-
-
-

-]]); +

+

]], a_Hook.Name, [[

+
+
+

+ ]]); f:write(LinkifyString(a_Hook.Desc, HookName)); - f:write("

\n

Callback function

\n

The default name for the callback function is "); - f:write(a_Hook.DefaultFnName .. ". It has the following signature:\n\n"); - f:write("

function " .. HookName .. "(");
+	f:write("

\n

Callback function

\n

The default name for the callback function is "); + f:write(a_Hook.DefaultFnName, ". It has the following signature:\n"); + f:write("

function ", HookName, "(");
 	if (a_Hook.Params == nil) then
 		a_Hook.Params = {};
 	end
@@ -1082,30 +1075,22 @@ function WriteHtmlHook(a_Hook)
 		end
 		f:write(param.Name);
 	end
-	f:write(")
\n\n

Parameters:

\n\n \n \n \n \n \n \n"); + f:write(")\n

Parameters:

\n
NameTypeNotes
\n"); for i, param in ipairs(a_Hook.Params) do - f:write(" \n \n \n \n \n"); + f:write("\n"); end - f:write("
NameTypeNotes
" .. param.Name .. "" .. LinkifyString(param.Type, HookName) .. "" .. LinkifyString(param.Notes, HookName) .. "
", param.Name, "", LinkifyString(param.Type, HookName), "", LinkifyString(param.Notes, HookName), "
\n\n

" .. (a_Hook.Returns or "") .. "

\n\n"); - f:write([[

Code examples

-

Registering the callback

- -]]); - f:write("
\n");
+	f:write("\n

" .. (a_Hook.Returns or "") .. "

\n\n"); + f:write([[

Code examples

Registering the callback

]]); + f:write("
\n");
 	f:write([[cPluginManager.AddHook(cPluginManager.]] .. a_Hook.Name .. ", My" .. a_Hook.DefaultFnName .. [[);]]);
 	f:write("
\n\n"); local Examples = a_Hook.CodeExamples or {}; for i, example in ipairs(Examples) do - f:write("

" .. (example.Title or "missing Title") .. "

\n"); - f:write("

" .. (example.Desc or "missing Desc") .. "

\n\n"); - f:write("
" .. (example.Code or "missing Code") .. "\n			
\n\n"); + f:write("

", (example.Title or "missing Title"), "

\n"); + f:write("

", (example.Desc or "missing Desc"), "

\n"); + f:write("
", (example.Code or "missing Code"), "\n
\n\n"); end - f:write([[
- - -]]); + f:write([[]]); f:close(); end -- cgit v1.2.3