From 3b18390549a1ec5bae784572800b2083a54be92f Mon Sep 17 00:00:00 2001 From: David Raznick Date: Thu, 25 Aug 2016 13:18:11 +0100 Subject: [PATCH] Change priority to highest. Currently the priority for the Autostructify is set to 1000. I think it was the intention to set it so that it runs before any other transforms. However the ordering in docutils is confusing and setting it to 1 actually means it will be run first. This was causing a problem for i18n in sphinx as it would not translate anything in ```eval_rst`` blocks or ``` directive:: ``` blocks as these were not converted to the node tree before gettext was meant to translate them. --- recommonmark/transform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recommonmark/transform.py b/recommonmark/transform.py index 6b3d0b4..0859e36 100644 --- a/recommonmark/transform.py +++ b/recommonmark/transform.py @@ -16,7 +16,7 @@ class AutoStructify(transforms.Transform): This class is designed to handle AST generated by CommonMarkParser. """ # set to a high priority so it can be applied first for markdown docs - default_priority = 1000 + default_priority = 1 suffix_set = set(['md', 'rst']) default_config = {