mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Merge pull request #6358 from cpitclaudel/production_rawsource
productionlist: Put the full production in production.rawsource
This commit is contained in:
@@ -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
|
||||
----------
|
||||
|
||||
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user