From 6ddc64bc7c1e83a363f2f4c7a2d2fba6a076d0cd Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 18 Apr 2018 14:30:30 -0700 Subject: [PATCH] Fixes for multiline doc descriotions breaking rst formatting * strip whitespace to preserve indent level * Make sure to indent subsequent lines of indentation --- docs/bin/plugin_formatter.py | 2 +- docs/templates/plugin.rst.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py index b869c535fd4..b1e558d0e27 100755 --- a/docs/bin/plugin_formatter.py +++ b/docs/bin/plugin_formatter.py @@ -117,7 +117,7 @@ def html_ify(text): t = _CONST.sub(r"\1", t) t = _RULER.sub(r"
", t) - return t + return t.strip() def rst_fmt(text, fmt): diff --git a/docs/templates/plugin.rst.j2 b/docs/templates/plugin.rst.j2 index 10651ffd271..f76db82a053 100644 --- a/docs/templates/plugin.rst.j2 +++ b/docs/templates/plugin.rst.j2 @@ -327,10 +327,10 @@ Common return values are documented :ref:`here `, the foll
{% if value.description is string %} -
@{ value.description | html_ify }@
+
@{ value.description | html_ify |indent(4)}@
{% else %} {% for desc in value.description %} -
@{ desc | html_ify }@
+
@{ desc | html_ify |indent(4)}@
{% endfor %} {% endif %}