From 5ab403bf3661345e09a8a772cfa218363ae357a5 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Fri, 30 Mar 2018 23:57:39 +0900 Subject: [PATCH] Define priority for transforms --- sphinx/application.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/sphinx/application.py b/sphinx/application.py index d6d66c925..1a59c5a60 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -968,7 +968,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):