diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-09-16 22:47:49 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-09-16 22:47:49 -0700 |
commit | 9add71365489cf21c07221e86f5705c6494c1efb (patch) | |
tree | 30eef26d9a013e8a99e420992c258f7b1418092a /tools/ldoc.ltp | |
parent | 86730f49bed89a8068f406266790303f07b0ae71 (diff) | |
download | pandoc-9add71365489cf21c07221e86f5705c6494c1efb.tar.gz |
Moved ldoc.ltp from doc to tools.
doc should be reserved for actual documents, I think.
@tarleb - will this cause a problem?
Diffstat (limited to 'tools/ldoc.ltp')
-rw-r--r-- | tools/ldoc.ltp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/ldoc.ltp b/tools/ldoc.ltp new file mode 100644 index 000000000..3fa96bb0f --- /dev/null +++ b/tools/ldoc.ltp @@ -0,0 +1,38 @@ +# local iter = ldoc.modules.iter +# local M = ldoc.markup + +<h1>Module $(module.name)</h1> + +<p>$(M(module.summary))</p> + +# for kind, items in module.kinds() do + +<h2>$(kind)</h2> + <dl> +# for item in items() do ldoc.item = item -- provides context for M() + <dt><span id="$(item.name)"><code>$(ldoc.display_name(item))</code></span></dt> + <dd> + <p>$(item.summary)</p> +# if item.params and #item.params > 0 then + $(module.kinds:type_of(item).subnames): + <dl> +# for p in iter(item.params) do + <dt><code>$(p)</code>:</dt> + <dd>$(M(item.params.map[p]))</dd> +# end -- for + </dl> +# end -- if params +# if item.ret then + <p>Returns: $(item.ret[1])</p> +# end -- if returns +# if item.usage then + <p>Usage:</p> + <pre><code>$(item.usage[1])</code></pre> +# end -- if usage +# if item.see then + See also: <a href="#$(item.see[1].label)">$(item.see[1].label)</a> + +# end -- if see +# end -- for items + </dl> +# end -- for kinds |