-O for one col layout, -S for simple (no params,ret or summary); one col switches off function list. Bumped to 1.3.8

This commit is contained in:
steve donovan 2013-03-28 13:28:05 +02:00
parent 897061ac17
commit 619d8e1710
3 changed files with 11 additions and 4 deletions

View File

@ -7,7 +7,7 @@
--
-- C/C++ support for Lua extensions is provided.
--
-- Available from LuaRocks as 'ldoc' and as a [Zip file](http://stevedonovan.github.com/files/ldoc-1.3.8.zip)
-- Available from LuaRocks as 'ldoc' and as a [Zip file](http://stevedonovan.github.com/files/ldoc-1.3.9.zip)
--
-- [Github Page](https://github.com/stevedonovan/ldoc)
--
@ -35,7 +35,7 @@ app.require_here()
--- @usage
local usage = [[
ldoc, a documentation generator for Lua, vs 1.3.8
ldoc, a documentation generator for Lua, vs 1.3.9
-d,--dir (default docs) output directory
-o,--output (default 'index') output name
-v,--verbose verbose
@ -44,7 +44,6 @@ ldoc, a documentation generator for Lua, vs 1.3.8
-m,--module module docs as text
-s,--style (default !) directory for style sheet (ldoc.css)
-l,--template (default !) directory for template (ldoc.ltp)
-1,--one use one-column output layout
-p,--project (default ldoc) project name
-t,--title (default Reference) page title
-f,--format (default plain) formatting - can be markdown, discount or plain
@ -56,6 +55,8 @@ ldoc, a documentation generator for Lua, vs 1.3.8
-C,--colon use colon style
-B,--boilerplate ignore first comment in source files
-M,--merge allow module merging
-S,--simple no return or params, no summary
-O,--one one-column output layout
--dump debug output dump
--filter (default none) filter output as Lua data (e.g pl.pretty.dump)
--tags (default none) show all references to given tags, comma-separated
@ -437,6 +438,11 @@ if type(ldoc.examples) == 'table' then
end)
end
if args.simple then
ldoc.no_return_or_parms=true
ldoc.no_summary=true
end
ldoc.readme = ldoc.readme or ldoc.topics
if type(ldoc.readme) == 'string' then
ldoc.readme = {ldoc.readme}

View File

@ -191,6 +191,7 @@ function html.generate_output(ldoc, args, project)
ldoc.module = ldoc.single
if ldoc.single and args.one then
ldoc.kinds_allowed = {module = true, topic = true}
ldoc.one = true
end
ldoc.root = true
if ldoc.module then

View File

@ -50,7 +50,7 @@ return [==[
# end
# if ldoc.no_summary and module then -- bang out the functions on the side
# if ldoc.no_summary and module and not ldoc.one then -- bang out the functions on the side
# for kind, items in module.kinds() do
<h2>$(kind)</h2>
<ul>