diff options
Diffstat (limited to 'sandbox/aahz/Effective/EffTransformer.py')
-rw-r--r-- | sandbox/aahz/Effective/EffTransformer.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/sandbox/aahz/Effective/EffTransformer.py b/sandbox/aahz/Effective/EffTransformer.py deleted file mode 100644 index a88e41cd7..000000000 --- a/sandbox/aahz/Effective/EffTransformer.py +++ /dev/null @@ -1,24 +0,0 @@ -from docutils import nodes -from docutils import transforms - -#class index_entry(nodes.Inline, nodes.TextElement): pass - -class Index(transforms.Transform): - default_priority = 250 - - def apply(self): - pending = self.startnode - curr_index = pending.parent.index(pending) - if curr_index == 0: - error = self.document.reporter.error( - 'Index directive must follow a text node', - nodes.literal_block(pending.rawsource, pending.rawsource), - line=pending.line) - pending.parent.replace(pending, error) - return - entries = [] - for entry in pending.details['entries']: - entries.append(entry) - sibling = pending.parent[curr_index-1] - sibling.children[0:0] = entries - pending.parent.remove(pending) |