Factor out ImageInfo into a core type. Refer to that in other msgtypes.
Add templating for msgtypes. ImageInfo core type is not referred to for m.image in order for the ImageInfo table to render for it.pull/977/head
parent
59168df363
commit
59f856c7e6
@ -0,0 +1,23 @@
|
|||||||
|
``{{event.msgtype}}``
|
||||||
|
{{(4 + event.msgtype | length) * '~'}}
|
||||||
|
{{event.desc | wrap(80)}}
|
||||||
|
{% for table in event.content_fields -%}
|
||||||
|
{{"``"+table.title+"``" if table.title else "" }}
|
||||||
|
|
||||||
|
================== ================= ===========================================
|
||||||
|
{{table.title or "Content"}} Key Type Description
|
||||||
|
================== ================= ===========================================
|
||||||
|
{% for row in table.rows -%}
|
||||||
|
{# -#}
|
||||||
|
{# Row type needs to prepend spaces to line up with the type column (19 ch) -#}
|
||||||
|
{# Desc needs to prepend the required text (maybe) and prepend spaces too -#}
|
||||||
|
{# It also needs to then wrap inside the desc col (43 ch width) -#}
|
||||||
|
{# -#}
|
||||||
|
{{row.key}}{{row.type|indent(19-row.key|length)}}{{row.desc|wrap(43,row.req_str | indent(18 - (row.type|length))) |indent_block(37)}}
|
||||||
|
{% endfor -%}
|
||||||
|
================== ================= ===========================================
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
Example::
|
||||||
|
|
||||||
|
{{example | jsonify(4, 4)}}
|
Loading…
Reference in New Issue