diff --git a/hacking/templates/rst.j2 b/hacking/templates/rst.j2 index 556ea1e36c9..8d279676cb9 100644 --- a/hacking/templates/rst.j2 +++ b/hacking/templates/rst.j2 @@ -21,7 +21,7 @@ {% if options -%} .. raw:: html - +
@@ -58,6 +58,7 @@ {% endif %} +{% if not plainexamples %} .. raw:: html {% for example in examples %} @@ -69,22 +70,19 @@

{% endfor %}
+{% endif %} {% if plainexamples %} -.. raw:: html -
+Examples::
+
 @{ plainexamples | escape | indent(4, True) }@
-    
{% endif %} {% if notes %} -.. raw:: html - -

Notes

- {% for note in notes %} -

@{ note | html_ify }@

- {% endfor %} +{% for note in notes %} +.. note:: @{ note | html_ify }@

+{% endfor %} {% endif %}
parameter required