fix(ldoc.ltp): item.inherited can be wrongly false
For some reasons, sometime `item.inherited` is `false` even if the item was added to the `all_module_kinds` table by the "hierarchy lookup" for-loop, and we already force the `inherited` property to be sets to `true` at this moment. With this commit, we add a second fail-check condition based on the `item.baseclass` property to determine if the item is inherited or not when we do the render.
This commit is contained in:
parent
12662d4cb1
commit
93e9361280
|
@ -259,6 +259,7 @@
|
|||
# end
|
||||
# for item in iter(k.items) do
|
||||
# local dn = display_name(item)
|
||||
# local inherited = item.inherited or (item.baseclass ~= module.name)
|
||||
# if item.sanitize_type then item.sanitize_type(item, ldoc) end
|
||||
<tr>
|
||||
# if item.display_type and not item.compact_signature then
|
||||
|
@ -272,8 +273,8 @@
|
|||
# end
|
||||
</td>
|
||||
# end
|
||||
<td colspan="$(item.inherited and 1 or 2)" class="summary">$(M(item.summary,item))</td>
|
||||
# if item.inherited then
|
||||
<td colspan="$(inherited and 1 or 2)" class="summary">$(M(item.summary,item))</td>
|
||||
# if inherited then
|
||||
<td class="baseclass" $(nowrap)>
|
||||
Inherited from $(item.baseclass)
|
||||
</td>
|
||||
|
@ -332,8 +333,8 @@
|
|||
<span class="proptype">$(item.display_type)</span>
|
||||
# end
|
||||
<span class="baseclass" $(nowrap)>
|
||||
# if item.inherited then
|
||||
· Inherited from $(item.baseclass)
|
||||
# if item.inherited or (item.baseclass ~= module.name) then
|
||||
· Inherited from $(M(item.baseclass, item))
|
||||
# end
|
||||
# if item.extra_summary then
|
||||
# for _, col in ldoc.ipairs(item.extra_summary) do
|
||||
|
|
Loading…
Reference in New Issue