From 19e586f969e11187848be367c825cd6dbd438fc0 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 10 Jul 2022 01:19:38 -0700 Subject: [PATCH] doc: Replace the rendering for the @property default values. --- docs/ldoc.css | 10 ++++++++-- docs/ldoc.ltp | 14 +++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/ldoc.css b/docs/ldoc.css index 4c1397014..54d150540 100644 --- a/docs/ldoc.css +++ b/docs/ldoc.css @@ -70,7 +70,8 @@ dd > code, td code, span.default_value, .see_also_description code, -.important_box code +.important_box code, +.property_type code { background-color: #eaedf587; padding-left: 3px; @@ -523,7 +524,7 @@ dl.function dd { margin-bottom: 15px; } -#content dl.function dd h3 { +#content dl.function dd h3, .property_type i { margin-top: 0px; margin-left: 0px; padding-left: 0px; @@ -747,3 +748,8 @@ pre .url { color: #272fc2; text-decoration: underline; } .copy-link--failure { background-color: red; } + +.property_type { + display: inline-block; + margin-left: 15px; +} diff --git a/docs/ldoc.ltp b/docs/ldoc.ltp index a054d99cd..a22d344fe 100644 --- a/docs/ldoc.ltp +++ b/docs/ldoc.ltp @@ -377,7 +377,19 @@
$(M(ldoc.descript(item),item)) -# if show_parms and item.params and #item.params > 0 and not item.hide_params then +# if kind == "Object properties" and item.params[1] then +
+ +
+# if item:default_of_param(item.params[1]) then + Default value: $(item:default_of_param(item.params[1]))
+# end +# if item.params[1] then + Type constraint: $(M(item.params.map[item.params[1]],item))
+# end +
+
+# elseif show_parms and item.params and #item.params > 0 and not item.hide_params then # local subnames = module.kinds:type_of(item).subnames # if subnames then

$(subnames):