Merge pull request #6358 from cpitclaudel/production_rawsource

productionlist: Put the full production in production.rawsource
This commit is contained in:
Takeshi KOMIYA
2019-05-14 22:30:38 +09:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -12,6 +12,8 @@ Incompatible changes
* #6230: The anchor of term in glossary directive is changed if it is consisted
by non-ASCII characters
* #4550: html: Centering tables by default using CSS
* The ``rawsource`` property of ``production`` nodes now contains the full
production rule.
Deprecated
----------
+1 -1
View File
@@ -443,7 +443,7 @@ class ProductionList(SphinxDirective):
name, tokens = rule.split(':', 1)
except ValueError:
break
subnode = addnodes.production()
subnode = addnodes.production(rule)
subnode['tokenname'] = name.strip()
if subnode['tokenname']:
idname = nodes.make_id('grammar-token-%s' % subnode['tokenname'])