diff --git a/cmd/docgen/docgen.lua b/cmd/docgen/docgen.lua index 7468f3b..e3d2b5f 100644 --- a/cmd/docgen/docgen.lua +++ b/cmd/docgen/docgen.lua @@ -125,16 +125,21 @@ for iface, dps in pairs(pieces) do for func, docs in pairs(dps) do local sig = string.format('%s.%s(', iface, func) + local params = '' for idx, param in ipairs(docs.params) do - sig = sig .. ((param.name:gsub('%?$', ''))) - if idx ~= #docs.params then sig = sig .. ', ' end + sig = sig .. param.name:gsub('%?$', '') + params = params .. param.name:gsub('%?$', '') + if idx ~= #docs.params then + sig = sig .. ', ' + params = params .. ', ' + end end sig = sig .. ')' if tocPos then local pos = f:seek() f:seek('set', tocPos) - f:write(string.format('|%s|%s|\n', func, sig, docs.description[1])) + f:write(string.format('|%s|%s|\n', func, string.format('%s(%s)', func, params), docs.description[1])) tocPos = f:seek() f:seek('set', pos) end diff --git a/docs/api/hilbish/hilbish.runner.md b/docs/api/hilbish/hilbish.runner.md index 244fb87..303996d 100644 --- a/docs/api/hilbish/hilbish.runner.md +++ b/docs/api/hilbish/hilbish.runner.md @@ -57,13 +57,17 @@ end) |setMode(cb)|This is the same as the `hilbish.runnerMode` function.| |lua(cmd)|Evaluates `cmd` as Lua input. This is the same as using `dofile`| |sh(cmd)|Runs a command in Hilbish's shell script interpreter.| -|hilbish.runner.getCurrent()|Returns the current runner by name.| -|hilbish.runner.setCurrent(name)|Sets the current interactive/command line runner mode.| -|hilbish.runner.add(name, runner)|Adds a runner to the table of available runners. If runner is a table,| -|hilbish.runner.get(name)|Get a runner by name.| -|hilbish.runner.set(name, runner)|Sets a runner by name. The runner table must have the run function in it.| -|hilbish.runner.exec(cmd, runnerName)|Executes cmd with a runner. If runnerName isn't passed, it uses| -> +|getCurrent()|Returns the current runner by name.| +|setCurrent(name)|Sets the current interactive/command line runner mode.| +|add(name, runner)|Adds a runner to the table of available runners. If runner is a table,| +|get(name)|Get a runner by name.| +|set(name, runner)|Sets a runner by name. The runner table must have the run function in it.| +|exec(cmd, runnerName)|Executes cmd with a runner. If runnerName isn't passed, it uses| +d) + + + + Evaluates `cmd` as Lua input. This is the same as using `dofile` or `load`, but is appropriated for the runner interface.