From dff343b792d2b6a65aab96ee324c0ac6b9013123 Mon Sep 17 00:00:00 2001
From: madmaxoft
]]);
f:write(LinkifyString(a_Hook.Desc));
- f:write("Callback function
function " .. a_Hook.DefaultFnName .. "(");
+ f:write("
The default name for the callback function is "); + f:write(a_Hook.DefaultFnName .. ". It has the following signature:
function " .. a_Hook.DefaultFnName .. "("); if (a_Hook.Params == nil) then a_Hook.Params = {}; end @@ -774,7 +775,12 @@ function WriteHtmlHook(a_Hook) cPluginManager.AddHook(cPluginManager.]] .. a_Hook.Name .. ", My" .. a_Hook.DefaultFnName .. [[);]]); - -- TODO: Other code examples + local Examples = a_Hook.CodeExamples or {}; + for i, example in ipairs(Examples) do + f:write("
" .. example.Desc .. "
\n"); + f:write("" .. example.Code .. "\n"); + end f:close(); end