From 7cf08e998694d4204ffc9e4fbe454291118ea299 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Sat, 24 Feb 2018 22:36:08 +0100 Subject: [PATCH] Improve parameter required values and ref fix (#36680) This PR includes: - An improvement to the parameter listing, where instead of yes/no, it is indicated with required/optional (easier when scrolling through a long list of parameters) - Ensure that module reference, eg. M(foobar) do not include the module document title --- docs/bin/plugin_formatter.py | 2 +- docs/templates/plugin.rst.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py index 216a537fc54..d1e6e659e28 100755 --- a/docs/bin/plugin_formatter.py +++ b/docs/bin/plugin_formatter.py @@ -89,7 +89,7 @@ def rst_ify(text): try: t = _ITALIC.sub(r"*\1*", text) t = _BOLD.sub(r"**\1**", t) - t = _MODULE.sub(r":ref:`\1`", t) + t = _MODULE.sub(r":ref:`\1 <\1>`", t) t = _URL.sub(r"\1", t) t = _CONST.sub(r"`\1`", t) except Exception as e: diff --git a/docs/templates/plugin.rst.j2 b/docs/templates/plugin.rst.j2 index 4cdc6c1a8ab..aae36a2e726 100644 --- a/docs/templates/plugin.rst.j2 +++ b/docs/templates/plugin.rst.j2 @@ -115,7 +115,7 @@ Options
{# required #} -
{% if value.get('required', False) %}yes{% else %}no{% endif %}
+
{% if value.get('required', False) %}required{% else %}optional{% endif %}
{# default value #}
{% if value.default %}@{ value.default }@{% endif %}
{# choices #}