doctrine / doctrine/rst-parser
Add transformers/node visitors
- Dominant language
- PHP
- Stars
- 63
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
It would be great if there is a supported way to traverse the generated `DocumentNode` and modify the node structure.
The [`docutils.transforms`](https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/transforms/) namespace includes quite some usage of such node visitor, some directly applicable to this library:
* Using `PendingNodes` to better handle the `.. class::` directive (see discussion in https://github.com/doctrine/rst-parser/pull/141#discussion_r598263469 )
* Allow auto-numbering sections ([ref](https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/transforms/parts.py#l18))
* Generating table of contents from a document node ([ref](https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/docutils/transforms/parts.py#l70))
Contributor guide
Assessment
This issue has not been assessed yet.