mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Refactor cmRST to split parsing into two phases; one which processes directives and collects lines to be output, and a second which performs the actual output. In particular, this fixes substitutions not being replaced when the definition appears after usage. To facilitate this, refactor how replacement definitions are collected so that content included via `toctree` has a separate replacement context. Also, record the length of the previously output line, so that when headings are detected, we can reconstruct the markup to match the (potentially changed by replacements) final length of the header text.
7 lines
125 B
ReStructuredText
7 lines
125 B
ReStructuredText
|not replaced|
|
|
Second TOC entry.
|
|
|
|
.. |nested replace| replace:: within a toctree
|
|
|
|
Replacements should work |nested replace|.
|