From 80a9016636ea586f65f55f15b89e3802d6605cf9 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Sun, 30 Sep 2012 13:20:24 +0200 Subject: [PATCH] module docs: fixed rst template - notes is now supported - multiline code examples are now supported (HTML rendering was off) --- hacking/templates/rst.j2 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hacking/templates/rst.j2 b/hacking/templates/rst.j2 index 6a2108a638f..f67e05339bc 100644 --- a/hacking/templates/rst.j2 +++ b/hacking/templates/rst.j2 @@ -18,7 +18,7 @@ @{ desc | jpfunc }@ {% endfor %} -{% if options is defined -%} +{% if options -%} .. raw:: html @@ -33,7 +33,7 @@ - + @@ -46,8 +46,17 @@ {% for example in examples %} {% if example['description'] %}

@{ example['description'] | html_ify }@

{% endif %}

-    @{ example['code'] }@

+ @{ example['code'] }@ +

{% endfor %}
+{% if notes %} +.. raw:: html + +

Notes

+ {% for note in notes %} +

@{ note | html_ify }@

+ {% endfor %} +{% endif %}
@{ k }@ @{ v.get('required',False) }@@{ v['default'] }@{% if v['default'] %}@{ v['default'] }@{% endif %}
    {% for choice in v.get('choices',[]) -%}
  • @{ choice }@
  • {% endfor -%}
{% for desc in v.description -%}@{ desc | html_ify }@{% endfor -%}