From bc35da73ac5552145441792f4c9c0af6de53a14a Mon Sep 17 00:00:00 2001 From: Aire-One Date: Tue, 26 Nov 2019 13:46:44 +0100 Subject: [PATCH] Implement inheritance into ldoc template. This use the new `@baseclass` and `@inherited` tags to add inheritance data to the rendered documentation. --- docs/ldoc.css | 14 ++++++++++++++ docs/ldoc.ltp | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/ldoc.css b/docs/ldoc.css index 3e3956415..76763fc79 100644 --- a/docs/ldoc.css +++ b/docs/ldoc.css @@ -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; diff --git a/docs/ldoc.ltp b/docs/ldoc.ltp index 38238908f..37d37a189 100644 --- a/docs/ldoc.ltp +++ b/docs/ldoc.ltp @@ -151,6 +151,11 @@ $(dn) # end $(M(item.summary,item)) + +# if item.inherited then + Inherited from $(item.baseclass) +# end + # end -- for items # last_kind = kind @@ -197,6 +202,9 @@ # if item.display_type then ($(item.display_type)) # end +# if item.inherited then +  · Inherited from $(item.baseclass) +# end # if ldoc.prettify_files and ldoc.is_file_prettified[item.module.file.filename] then line $(item.lineno) # end