summaryrefslogtreecommitdiffstats
path: root/doc/tools/makerst.py
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2019-03-29 23:37:35 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2019-03-29 23:47:35 +0100
commitd80bc5cbbab71fb9b8f25ec56a0baa5b4cee68a9 (patch)
treeff8c5d6c286c0dfc9db349090bffcda730b58e22 /doc/tools/makerst.py
parentc8aa85189a8736bb9723770b9409e6f9c00fc249 (diff)
downloadredot-engine-d80bc5cbbab71fb9b8f25ec56a0baa5b4cee68a9.tar.gz
ClassRef: Replace [code]CurrentClass[/code] with [CurrentClass]
Modified makerst to generate code tags for these to avoid hyperlinks to the same class.
Diffstat (limited to 'doc/tools/makerst.py')
-rwxr-xr-xdoc/tools/makerst.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 6d9cd7140a..dc6d270c08 100755
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -702,7 +702,11 @@ def rstize_text(text, state): # type: (str, State) -> str
escape_post = False
if tag_text in state.classes:
- tag_text = make_type(tag_text, state)
+ if tag_text == state.current_class:
+ # We don't want references to the same class
+ tag_text = '``{}``'.format(tag_text)
+ else:
+ tag_text = make_type(tag_text, state)
escape_post = True
else: # command
cmd = tag_text