summaryrefslogtreecommitdiff
path: root/docs/_exts
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2022-11-08 10:24:07 +0100
committerErik Faye-Lund <erik.faye-lund@collabora.com>2022-11-15 11:25:05 +0100
commit4eef5628c86e930c48f90cdcbe51bf5a3651c4c4 (patch)
tree81e248e0a17e9305151fc60a92d117f12c4b6d83 /docs/_exts
parent864e658c0a069026c1f123079cfb09ecc4cf06cf (diff)
downloadmesa-4eef5628c86e930c48f90cdcbe51bf5a3651c4c4.tar.gz
mesa-4eef5628c86e930c48f90cdcbe51bf5a3651c4c4.tar.bz2
mesa-4eef5628c86e930c48f90cdcbe51bf5a3651c4c4.zip
docs: drop custom envvar directive
The custom envvar directive is strange. It overloads the global namespace, where there's already a well-known envvar directive, but the envvar role won't resolve to envvars defined using the custom directive. It's not really critical to declare the type and default value here, and many descriptions already include this. Let's just use the plain one, and let the description take care of the details where needed. Reviewed-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>
Diffstat (limited to 'docs/_exts')
-rw-r--r--docs/_exts/formatting.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/docs/_exts/formatting.py b/docs/_exts/formatting.py
index c7322d47a58..027662552c2 100644
--- a/docs/_exts/formatting.py
+++ b/docs/_exts/formatting.py
@@ -9,18 +9,6 @@ import sphinx.addnodes
from sphinx.util.nodes import split_explicit_title
from docutils import nodes, utils
-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(" ()")
- 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
-
def parse_opcode(env, sig, signode):
opcode, desc = sig.split("-", 1)
opcode = opcode.strip().upper()
@@ -46,8 +34,6 @@ def ext_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
return [pnode], []
def setup(app):
- app.add_object_type("envvar", "envvar", "%s (environment variable)",
- parse_envvar)
app.add_object_type("opcode", "opcode", "%s (TGSI opcode)",
parse_opcode)
app.add_role('ext', ext_role)