summaryrefslogtreecommitdiff
path: root/docs/_exts/formatting.py
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2020-07-02 14:15:57 +0200
committerMarge Bot <eric+marge@anholt.net>2020-07-07 10:22:08 +0000
commit026615c0f9ed99896b58532587d7a149b471b4de (patch)
treea98131d84d4020e7c47d85254684c11626e636a2 /docs/_exts/formatting.py
parentc8537744bbab4297ce0b335b80c1907e9717123e (diff)
downloadmesa-026615c0f9ed99896b58532587d7a149b471b4de.tar.gz
mesa-026615c0f9ed99896b58532587d7a149b471b4de.tar.bz2
mesa-026615c0f9ed99896b58532587d7a149b471b4de.zip
docs: fixup envvar output
Sphinx 2.x has changed how this works, and some of this whitespace now gets stripped as a result. So let's instead actual whitespace as separate text-nodes instead. Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5706>
Diffstat (limited to 'docs/_exts/formatting.py')
-rw-r--r--docs/_exts/formatting.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/_exts/formatting.py b/docs/_exts/formatting.py
index bc50c98051c..cc6c471f117 100644
--- a/docs/_exts/formatting.py
+++ b/docs/_exts/formatting.py
@@ -9,10 +9,12 @@ import sphinx.addnodes
def parse_envvar(env, sig, signode):
envvar, t, default = sig.split(" ", 2)
envvar = envvar.strip().upper()
- t = " Type: %s" % t.strip(" <>").lower()
- default = " Default: %s" % default.strip(" ()")
+ t = "Type: %s" % t.strip(" <>").lower()
+ default = "Default: %s" % default.strip(" ()")
signode += sphinx.addnodes.desc_name(envvar, envvar)
+ signode += docutils.nodes.Text(' ')
signode += sphinx.addnodes.desc_type(t, t)
+ signode += docutils.nodes.Text(', ')
signode += sphinx.addnodes.desc_annotation(default, default)
return envvar