From 026615c0f9ed99896b58532587d7a149b471b4de Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 2 Jul 2020 14:15:57 +0200 Subject: [PATCH] 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: --- docs/_exts/formatting.py | 6 ++++-- 1 file 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 -- 2.30.2