Fixes for multiline doc descriotions breaking rst formatting

* strip whitespace to preserve indent level
* Make sure to indent subsequent lines of indentation
pull/39034/head
Toshio Kuratomi 6 years ago
parent ede1d6158a
commit 6ddc64bc7c

@ -117,7 +117,7 @@ def html_ify(text):
t = _CONST.sub(r"<code>\1</code>", t) t = _CONST.sub(r"<code>\1</code>", t)
t = _RULER.sub(r"<hr/>", t) t = _RULER.sub(r"<hr/>", t)
return t return t.strip()
def rst_fmt(text, fmt): def rst_fmt(text, fmt):

@ -327,10 +327,10 @@ Common return values are documented :ref:`here <common_return_values>`, the foll
<td> <td>
<div class="cell-border"> <div class="cell-border">
{% if value.description is string %} {% if value.description is string %}
<div>@{ value.description | html_ify }@</div> <div>@{ value.description | html_ify |indent(4)}@</div>
{% else %} {% else %}
{% for desc in value.description %} {% for desc in value.description %}
<div>@{ desc | html_ify }@</div> <div>@{ desc | html_ify |indent(4)}@</div>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<br/> <br/>

Loading…
Cancel
Save