From: Erik Faye-Lund Date: Thu, 2 Jul 2020 12:15:57 +0000 (+0200) Subject: docs: fixup envvar output X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=026615c0f9ed99896b58532587d7a149b471b4de;p=mesa.git 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 Part-of: --- 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