From 4102e6a50339df83eb4be59d9f6a0c4f27d45369 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 24 Nov 2019 03:59:38 -0500 Subject: [PATCH] doc: Update the template to render sub-tags. Sub-tags are a new concept and is equivalent to @tparam, but in a generic form. --- docs/ldoc.ltp | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/docs/ldoc.ltp b/docs/ldoc.ltp index eebb6b43..38238908 100644 --- a/docs/ldoc.ltp +++ b/docs/ldoc.ltp @@ -204,21 +204,6 @@
$(M(ldoc.descript(item),item)) -# if ldoc.custom_tags then -# for custom in iter(ldoc.custom_tags) do -# local tag = item.tags[custom[1]] -# if tag and not custom.hidden then -# local li,il = use_li(tag) -

$(custom.title or custom[1]):

- -# end -- iter tags -# end - # if 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 @@ -307,6 +292,36 @@ # end -- if usage +# if ldoc.custom_tags then +# for custom in iter(ldoc.custom_tags) do +# local tag = item.tags[custom[1]] +# if tag and not custom.hidden then +# local group_begin, group_end, row_type_begin, row_type_end, group_header = item.get_delim(custom[1]) +

$(custom.title or custom[1]):

+ <$(group_begin)> +# if group_header then + +# for _, g in ldoc.ipairs(group_header) do + $(g) +# end -- for g + +# end -- if group_header then +# for value in iter(tag) do + <$(row_type_begin)>$(custom.format and custom.format(value, item, M) or M(value)) +# local sub_values, sub_custom = item.get_auto_params(custom[1], value) +# if sub_values then + +# end -- if item.auto_params +# end -- for + +# end -- if tag +# end -- iter tags +# end -- ldoc.custom_tags +
# end -- for items # last_kind = kind