From 63e3618c0511c99ca1ded3cd60498de65c0c4877 Mon Sep 17 00:00:00 2001 From: Steve Donovan Date: Wed, 27 Nov 2013 09:50:38 +0200 Subject: [PATCH] Issue #110; use '-u' or 'unqualified' explicitly to strip package names on sidebar (thanks to abadc0de) --- ldoc.lua | 2 ++ ldoc/html.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ldoc.lua b/ldoc.lua index 18e109e..31db3c4 100644 --- a/ldoc.lua +++ b/ldoc.lua @@ -52,6 +52,7 @@ ldoc, a documentation generator for Lua, vs 1.4.0 -b,--package (default .) top-level package basename (needed for module(...)) -x,--ext (default html) output file extension -c,--config (default config.ld) configuration name + -u,--unqualified don't show package name in sidebar links -i,--ignore ignore any 'no doc comment or no module' warnings -X,--not_luadoc break LuaDoc compatibility. Descriptions may continue after tags. -D,--define (default none) set a flag to be used in config.ld @@ -199,6 +200,7 @@ local ldoc_contents = { 'boilerplate','merge', 'wrap', 'not_luadoc', 'template_escape','merge_error_groups', 'no_return_or_parms','no_summary','full_description','backtick_references', 'custom_see_handler', 'no_space_before_args','parse_extra','no_lua_ref','sort_modules','use_markdown_titles', + 'unqualified', } ldoc_contents = tablex.makeset(ldoc_contents) diff --git a/ldoc/html.lua b/ldoc/html.lua index 1422ca5..bfc67cd 100644 --- a/ldoc/html.lua +++ b/ldoc/html.lua @@ -97,7 +97,7 @@ function html.generate_output(ldoc, args, project) function ldoc.module_name (mod) local name = mod.name - if mod.type == 'module' then -- leave out package (also for 'classmod'??) + if args.unqualified and mod.type == 'module' then -- leave out package (also for 'classmod'??) name = name:gsub('^.-%.','') elseif mod.type == 'topic' then if mod.display_name then