render-object-table: support adding an anchor to generated tables.

This commit is contained in:
Richard van der Hoff 2022-07-19 18:18:00 +01:00
parent 1ed4e40362
commit 2ef9eb9a1c

View file

@ -4,6 +4,8 @@
* `title`: optional caption for the table * `title`: optional caption for the table
* `anchor`: optional HTML element id for the table
* `properties`: dictionary of the properties to list, each given as: * `properties`: dictionary of the properties to list, each given as:
`property_name` : `property_data` `property_name` : `property_data`
@ -19,7 +21,7 @@
{{ if $properties }} {{ if $properties }}
<table class> <table{{ if .anchor }} id="{{ .anchor }}"{{ end }}>
{{ with $title }} {{ with $title }}
<caption>{{ . }}</caption> <caption>{{ . }}</caption>
{{ end }} {{ end }}