Implement inheritance into ldoc template.

This use the new `@baseclass` and `@inherited` tags to add inheritance data to the rendered documentation.
This commit is contained in:
Aire-One 2019-11-26 13:46:44 +01:00 committed by Emmanuel Lepage Vallee
parent 4102e6a503
commit bc35da73ac
2 changed files with 22 additions and 0 deletions

View File

@ -288,6 +288,7 @@ table.module_list td.summary, table.function_list td.summary {
background-color: white;
width: 100%;
border-left-width: 0px;
border-right: none;
}
table.function_list td.shortname {
@ -334,6 +335,19 @@ table.function_list .function_named_args {
text-decoration-color: #bbd3ff;
}
table.function_list td.baseclass {
background-color: white;
color: #a4c7ff;
min-width: 200px;
border-left: none;
border-right: none;
text-align: right;
}
.baseclass {
font-size: 85%;
}
dl.function {
margin-right: 15px;
margin-left: 15px;

View File

@ -151,6 +151,11 @@
<td class="name" $(nowrap)><a href="#$(item.name)">$(dn)</a></td>
# end
<td class="summary">$(M(item.summary,item))</td>
<td class="baseclass" $(nowrap)>
# if item.inherited then
Inherited from $(item.baseclass)
# end
</td>
</tr>
# end -- for items
# last_kind = kind
@ -197,6 +202,9 @@
# if item.display_type then
<span class="proptype">($(item.display_type))</span>
# end
# if item.inherited then
<span class="baseclass" $(nowrap)>&nbsp;&middot;&nbsp;Inherited from $(item.baseclass)</span>
# end
# if ldoc.prettify_files and ldoc.is_file_prettified[item.module.file.filename] then
<a style="float:right;" href="$(ldoc.source_ref(item))">line $(item.lineno)</a>
# end