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
|
# end
|
||||||
# for item in iter(k.items) do
|
# for item in iter(k.items) do
|
||||||
# local dn = display_name(item)
|
# 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
|
# if item.sanitize_type then item.sanitize_type(item, ldoc) end
|
||||||
<tr>
|
<tr>
|
||||||
# if item.display_type and not item.compact_signature then
|
# if item.display_type and not item.compact_signature then
|
||||||
|
@ -272,8 +273,8 @@
|
||||||
# end
|
# end
|
||||||
</td>
|
</td>
|
||||||
# end
|
# end
|
||||||
<td colspan="$(item.inherited and 1 or 2)" class="summary">$(M(item.summary,item))</td>
|
<td colspan="$(inherited and 1 or 2)" class="summary">$(M(item.summary,item))</td>
|
||||||
# if item.inherited then
|
# if inherited then
|
||||||
<td class="baseclass" $(nowrap)>
|
<td class="baseclass" $(nowrap)>
|
||||||
Inherited from $(item.baseclass)
|
Inherited from $(item.baseclass)
|
||||||
</td>
|
</td>
|
||||||
|
@ -332,8 +333,8 @@
|
||||||
<span class="proptype">$(item.display_type)</span>
|
<span class="proptype">$(item.display_type)</span>
|
||||||
# end
|
# end
|
||||||
<span class="baseclass" $(nowrap)>
|
<span class="baseclass" $(nowrap)>
|
||||||
# if item.inherited then
|
# if item.inherited or (item.baseclass ~= module.name) then
|
||||||
· Inherited from $(item.baseclass)
|
· Inherited from $(M(item.baseclass, item))
|
||||||
# end
|
# end
|
||||||
# if item.extra_summary then
|
# if item.extra_summary then
|
||||||
# for _, col in ldoc.ipairs(item.extra_summary) do
|
# for _, col in ldoc.ipairs(item.extra_summary) do
|
||||||
|
|
Loading…
Reference in New Issue