summaryrefslogtreecommitdiff
path: root/docs/bin
diff options
context:
space:
mode:
authorDag Wieers <dag@wieers.com>2018-02-24 17:16:24 +0100
committerGitHub <noreply@github.com>2018-02-24 17:16:24 +0100
commit8a040415f9871a033e1ccb176ff4a327613d7991 (patch)
tree8d1f553c23add7d5a5be55c6393dbb91ddd395b1 /docs/bin
parent3016bc7351a490008362e4b190533ddffc68bf70 (diff)
downloadansible-8a040415f9871a033e1ccb176ff4a327613d7991.tar.gz
Fix module references in module docs (#36674)
Diffstat (limited to 'docs/bin')
-rwxr-xr-xdocs/bin/plugin_formatter.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py
index 4d630bfdfa..216a537fc5 100755
--- a/docs/bin/plugin_formatter.py
+++ b/docs/bin/plugin_formatter.py
@@ -87,13 +87,13 @@ def rst_ify(text):
''' convert symbols like I(this is in italics) to valid restructured text '''
try:
- t = _ITALIC.sub(r'*' + r"\1" + r"*", text)
- t = _BOLD.sub(r'**' + r"\1" + r"**", t)
- t = _MODULE.sub(r':ref:`module_docs/' + r"\1 <\1>" + r"`", t)
+ t = _ITALIC.sub(r"*\1*", text)
+ t = _BOLD.sub(r"**\1**", t)
+ t = _MODULE.sub(r":ref:`\1`", t)
t = _URL.sub(r"\1", t)
- t = _CONST.sub(r'``' + r"\1" + r"``", t)
+ t = _CONST.sub(r"`\1`", t)
except Exception as e:
- raise AnsibleError("Could not process (%s) : %s" % (str(text), str(e)))
+ raise AnsibleError("Could not process (%s) : %s" % (text, e))
return t
@@ -102,11 +102,11 @@ def html_ify(text):
''' convert symbols like I(this is in italics) to valid HTML '''
t = html_escape(text)
- t = _ITALIC.sub("<em>" + r"\1" + "</em>", t)
- t = _BOLD.sub("<b>" + r"\1" + "</b>", t)
- t = _MODULE.sub("<span class='module'>" + r"\1" + "</span>", t)
- t = _URL.sub("<a href='" + r"\1" + "'>" + r"\1" + "</a>", t)
- t = _CONST.sub("<code>" + r"\1" + "</code>", t)
+ t = _ITALIC.sub(r"<em>\1</em>", t)
+ t = _BOLD.sub(r"<b>\1</b>", t)
+ t = _MODULE.sub(r"<span class='module'>\1</span>", t)
+ t = _URL.sub(r"<a href='\1'>\1</a>", t)
+ t = _CONST.sub(r"<code>\1</code>", t)
return t