fix: signature link in table of contents

document-lua
sammyette 2024-12-24 18:53:34 -04:00
parent b1e074ccb5
commit 5545002d92
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
2 changed files with 8 additions and 21 deletions

View File

@ -134,7 +134,7 @@ for iface, dps in pairs(pieces) do
if tocPos then
local pos = f:seek()
f:seek('set', tocPos)
f:write(string.format('|<a href="#%s">|%s|\n', func, docs.description[1]))
f:write(string.format('|<a href="#%s">%s</a>|%s|\n', func, sig, docs.description[1]))
tocPos = f:seek()
f:seek('set', pos)
end

View File

@ -57,26 +57,13 @@ end)
|<a href="#runner.setMode">setMode(cb)</a>|This is the same as the `hilbish.runnerMode` function.|
|<a href="#runner.lua">lua(cmd)</a>|Evaluates `cmd` as Lua input. This is the same as using `dofile`|
|<a href="#runner.sh">sh(cmd)</a>|Runs a command in Hilbish's shell script interpreter.|
|<a href="#getCurrent">|Returns the current runner by name.|
|<a href="#setCurrent">|Sets the current interactive/command line runner mode.|
|<a href="#add">|Adds a runner to the table of available runners. If runner is a table,|
|<a href="#get">|Get a runner by name.|
|<a href="#set">|Sets a runner by name. The runner table must have the run function in it.|
|<a href="#exec">|Executes cmd with a runner. If runnerName isn't passed, it uses|
### Parameters
`function` **`cb`**
</div>
<hr>
<div id='runner.lua'>
<h4 class='heading'>
hilbish.runner.lua(cmd)
<a href="#runner.lua" class='heading-link'>
<i class="fas fa-paperclip"></i>
</a>
</h4>
|<a href="#getCurrent">hilbish.runner.getCurrent()</a>|Returns the current runner by name.|
|<a href="#setCurrent">hilbish.runner.setCurrent(name)</a>|Sets the current interactive/command line runner mode.|
|<a href="#add">hilbish.runner.add(name, runner)</a>|Adds a runner to the table of available runners. If runner is a table,|
|<a href="#get">hilbish.runner.get(name)</a>|Get a runner by name.|
|<a href="#set">hilbish.runner.set(name, runner)</a>|Sets a runner by name. The runner table must have the run function in it.|
|<a href="#exec">hilbish.runner.exec(cmd, runnerName)</a>|Executes cmd with a runner. If runnerName isn't passed, it uses|
>
Evaluates `cmd` as Lua input. This is the same as using `dofile`
or `load`, but is appropriated for the runner interface.