diff options
| author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-07-05 23:14:55 +0000 |
|---|---|---|
| committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-07-05 23:14:55 +0000 |
| commit | e0a1eaac9d47da79a00c92c74ef7e789464421b7 (patch) | |
| tree | 381045a71192c1719be92dd4841bad64f9ef04c0 /docutils/transforms/misc.py | |
| parent | 2703f7c25b10c10f59db93e0776cb81c1d181bca (diff) | |
| download | docutils-e0a1eaac9d47da79a00c92c74ef7e789464421b7.tar.gz | |
moved expose_internals logic out of FinalChecks into a
separate transform, universal.ExposeInternals
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3658 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/transforms/misc.py')
| -rw-r--r-- | docutils/transforms/misc.py | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/docutils/transforms/misc.py b/docutils/transforms/misc.py index eb50a1124..fd8ba6b25 100644 --- a/docutils/transforms/misc.py +++ b/docutils/transforms/misc.py @@ -71,6 +71,28 @@ class ClassAttribute(Transform): class Transitions(Transform): + """ + Move transitions at the end of sections up the tree. Complain + on transitions after a title, at the beginning or end of the + document, and after another transition. + + For example, transform this:: + + <section> + ... + <transition> + <section> + ... + + into this:: + + <section> + ... + <transition> + <section> + ... + """ + default_priority = 830 def apply(self): @@ -78,27 +100,6 @@ class Transitions(Transform): self.visit_transition(node) def visit_transition(self, node): - """ - Move transitions at the end of sections up the tree. Complain - on transitions after a title, at the beginning or end of the - document, and after another transition. - - For example, transform this:: - - <section> - ... - <transition> - <section> - ... - - into this:: - - <section> - ... - <transition> - <section> - ... - """ index = node.parent.index(node) error = None if (index == 0 or |
