git.iko.soy/typeable/pandoc
on issue5354 help sign in
38 lines 982 B history raw
1# local iter = ldoc.modules.iter
2# local M = ldoc.markup
4<h1>Module $(module.name)</h1>
6<p>$(M(module.summary))</p>
8# for kind, items in module.kinds() do
10<h2>$(kind)</h2>
11 <dl>
12# for item in items() do ldoc.item = item -- provides context for M()
13 <dt><span id="$(item.name)"><code>$(ldoc.display_name(item))</code></span></dt>
14 <dd>
15 <p>$(item.summary)</p>
16# if item.params and #item.params > 0 then
17 $(module.kinds:type_of(item).subnames):
18 <dl>
19# for p in iter(item.params) do
20 <dt><code>$(p)</code>:</dt>
21 <dd>$(M(item.params.map[p]))</dd>
22# end -- for
23 </dl>
24# end -- if params
25# if item.ret then
26 <p>Returns: $(item.ret[1])</p>
27# end -- if returns
28# if item.usage then
29 <p>Usage:</p>
30 <pre><code>$(item.usage[1])</code></pre>
31# end -- if usage
32# if item.see then
33 See also: <a href="#$(item.see[1].label)">$(item.see[1].label)</a>
35# end -- if see
36# end -- for items
37 </dl>
38# end -- for kinds