mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4810 from tk0miya/define_priority_for_transforms
Proposal: Define priority for transforms
This commit is contained in:
commit
320421be67
@ -970,7 +970,30 @@ class Sphinx(object):
|
||||
Add the standard docutils :class:`Transform` subclass *transform* to
|
||||
the list of transforms that are applied after Sphinx parses a reST
|
||||
document.
|
||||
"""
|
||||
|
||||
.. list-table:: priority range categories for Sphinx transforms
|
||||
|
||||
* - Priority
|
||||
- Main purpose in Sphinx
|
||||
* - 0-99
|
||||
- Fix invalid nodes by docutils. Translate a doctree.
|
||||
* - 100-299
|
||||
- Preparation
|
||||
* - 300-399
|
||||
- early
|
||||
* - 400-699
|
||||
- main
|
||||
* - 700-799
|
||||
- Post processing. Deadline to modify text and referencing.
|
||||
* - 800-899
|
||||
- Collect referencing and referenced nodes. Domain processing.
|
||||
* - 900-999
|
||||
- Finalize and clean up.
|
||||
|
||||
refs: `Transform Priority Range Categories`__
|
||||
|
||||
__ http://docutils.sourceforge.net/docs/ref/transforms.html#transform-priority-range-categories
|
||||
""" # NOQA
|
||||
self.registry.add_transform(transform)
|
||||
|
||||
def add_post_transform(self, transform):
|
||||
|
Loading…
Reference in New Issue
Block a user