Thanks for that, I'm gonna have a look at this and test it
I've been working on a function to clean useless nodes.
I'm fighting with a simple case : how to replace a node by it subnode & 
tree ?
See last line

for pos in c.all_positions():
        if '@rst-no-head' in pos.h:
            parent = pos.getParent()
            parent.b = '\n'.join(pos.b.split('\n')[3:])#Delete the first 3 
lines 'Title' already present in parent.h
            pos.doDelete()
        elif pos.hasFirstChild() and 'Warning: this node is ignored when 
writing this file' in pos.b:
            child=pos.getFirstChild()
            if pos.h==child.h:
                if not child.hasFirstChild():
                    pos.b=child.b
                    child.doDelete()
                elif not child.hasNext():
                    How to replace pos by child  ??!



Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to