diff --git a/ldoc/doc.lua b/ldoc/doc.lua index 3fc46c5..4d3dfd6 100644 --- a/ldoc/doc.lua +++ b/ldoc/doc.lua @@ -238,7 +238,7 @@ function File:finish() elseif doc.project_level(item.type) then this_mod = item local package,mname,submodule - if item.type == 'module' then + if item.type == 'module' or item.type == 'classmod' then -- if name is 'package.mod', then mod_name is 'mod' package,mname = split_dotted_name(this_mod.name) if self.args.merge then diff --git a/tests/styles/four.lua b/tests/styles/four.lua index 07ffd99..09f3bf0 100644 --- a/tests/styles/four.lua +++ b/tests/styles/four.lua @@ -31,12 +31,13 @@ end --- third useless function. -- Can always put comments inline, may -- be multiple. --- note that first comment is refers to return +-- note that first comment refers to return type! function three ( -- person: name, -- string: person's name age -- int: -- not less than zero! ) +end ---- function with single optional arg -- @param[opt] one