diff --git a/ldoc/doc.lua b/ldoc/doc.lua index e4fce52..05474e8 100644 --- a/ldoc/doc.lua +++ b/ldoc/doc.lua @@ -1198,7 +1198,8 @@ end -- and try to to resolve this. function Module:resolve_references(modules) local found = List() - for item in self.items:iter() do + -- Resolve see references in item. Can be Module or Item type. + local function resolve_item_references(item) local see = item.tags.see if see then -- this guy has @see references item.see = List() @@ -1213,6 +1214,11 @@ function Module:resolve_references(modules) end end end + + resolve_item_references(self); -- Resolve module-level see references. + for item in self.items:iter() do + resolve_item_references(item); -- Resolve item-level see references. + end -- mark as found, so we don't waste time re-searching for f in found:iter() do f[1].tags.see:remove_value(f[2]) diff --git a/ldoc/html/ldoc_ltp.lua b/ldoc/html/ldoc_ltp.lua index e5a081f..52247dc 100644 --- a/ldoc/html/ldoc_ltp.lua +++ b/ldoc/html/ldoc_ltp.lua @@ -90,6 +90,15 @@ return [==[ # if module.tags.include then $(M(ldoc.include_file(module.tags.include))) # end +# if module.see then +# local li,il = use_li(module.see) +

See also:

+ +# end -- if see # if module.usage then # local li,il = use_li(module.usage)

Usage: