diff --git a/ldoc/html.lua b/ldoc/html.lua index 9a92ec2..a7401db 100644 --- a/ldoc/html.lua +++ b/ldoc/html.lua @@ -95,6 +95,14 @@ function html.generate_output(ldoc, args, project) return (item.summary or '?')..' '..(item.description or '') end + function ldoc.module_name (mod) + local name = mod.name + if mod.type == 'module' then + name = name:gsub('^.-%.','') + end + return name + end + -- this generates the internal module/function references function ldoc.href(see) if see.href then -- explict reference, e.g. to Lua manual diff --git a/ldoc/html/ldoc_ltp.lua b/ldoc/html/ldoc_ltp.lua index eee6277..3a43362 100644 --- a/ldoc/html/ldoc_ltp.lua +++ b/ldoc/html/ldoc_ltp.lua @@ -71,7 +71,7 @@ return [==[ # if mod.name == this_mod then -- highlight current module, link to others
  • $(mod.name)
  • # else -
  • $(mod.name)
  • +
  • $(ldoc.module_name(mod))
  • # end # end # end