summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-09-28 01:39:16 +0900
committerGitHub <noreply@github.com>2020-09-28 01:39:16 +0900
commit574b3da4fb184914d67c2d6efd2ab141c68454f3 (patch)
tree08dd6fb18e62623de2016f7791efc3efb1f63c5a
parenta81c45367a54444b4d534676c06e46538fa5c6b7 (diff)
parentd0ba4f8d449858440c4407033a28bddf9b5611b3 (diff)
downloadsphinx-git-574b3da4fb184914d67c2d6efd2ab141c68454f3.tar.gz
Merge pull request #8239 from silene/fix_productionlist_references
Fix references to production names.
-rw-r--r--sphinx/domains/std.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py
index 7eaaa531d..39f67b54e 100644
--- a/sphinx/domains/std.py
+++ b/sphinx/domains/std.py
@@ -500,7 +500,8 @@ class ProductionList(SphinxDirective):
except ValueError:
break
subnode = addnodes.production(rule)
- subnode['tokenname'] = name.strip()
+ name = name.strip()
+ subnode['tokenname'] = name
if subnode['tokenname']:
prefix = 'grammar-token-%s' % productionGroup
node_id = make_id(self.env, self.state.document, prefix, name)