mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
The ``productionlist`` directive operates in a line-based context, creating an ``addnodes.productionlist`` container of ``addnodes.production`` nodes, with one per production in the directive. However, the full state of the abstract document tree is not included in the produced nodes, with each builder/translator implementing a different way of appending the fixed separator ``::=`` and justifying the displayed text. This should not happen in the writer, and hard-coding such details hampers flexibility when documenting different abstract grammars. We move the specific form of the ``.. productionlist::`` directive to the logic in the directive body and have the writers apply minimal custom logic. LaTeX changes written by Jean-François B.