From d408ec7846b3bb9370ed87cfecaccf3196585d9b Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sat, 29 Feb 2020 21:16:11 -0500 Subject: [PATCH] doc: Use a more compact rendering for method return types. --- docs/config.ld | 2 ++ docs/ldoc.css | 2 +- docs/ldoc.ltp | 9 +++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/config.ld b/docs/config.ld index a556bccf..f3b0b116 100644 --- a/docs/config.ld +++ b/docs/config.ld @@ -785,6 +785,8 @@ local function sanitize_return_type(item, ldoc) item.display_type = item.display_type .. "" end + + item.compact_signature = true end local no_prefix = { diff --git a/docs/ldoc.css b/docs/ldoc.css index 3fe8a09d..f87d1fc0 100644 --- a/docs/ldoc.css +++ b/docs/ldoc.css @@ -316,7 +316,7 @@ span.inheritance { font-weight: normal; } -td.summarytype { +.summarytype { background-color: white; color: #a4c7ff; font-size: 85%; diff --git a/docs/ldoc.ltp b/docs/ldoc.ltp index f5604eeb..3c878cc3 100644 --- a/docs/ldoc.ltp +++ b/docs/ldoc.ltp @@ -155,11 +155,16 @@ # local dn = display_name(item) # if item.sanitize_type then item.sanitize_type(item, ldoc) end -# if item.display_type then +# if item.display_type and not item.compact_signature then $(dn) $(item.display_type) # else - $(dn) + + $(dn) +# if item.display_type and item.compact_signature then + $(item.display_type) +# end + # end $(M(item.summary,item)) # if item.inherited then