diff options
| author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-08-24 15:05:38 +0000 |
|---|---|---|
| committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-08-24 15:05:38 +0000 |
| commit | 45a328052bcadcabf1bbd891695a1126f64905bb (patch) | |
| tree | 2dacf87c382074059b9bc032abc0a7ecee4d823f /docutils | |
| parent | 680e2a8b60204c441fce189c89ef14491532af3c (diff) | |
| download | docutils-45a328052bcadcabf1bbd891695a1126f64905bb.tar.gz | |
fixed bug with prune_subdocs in Node.traverse (will be tested in later check-ins)
git-svn-id: http://svn.code.sf.net/p/docutils/code/branches/subdocs@5422 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
| -rw-r--r-- | docutils/nodes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docutils/nodes.py b/docutils/nodes.py index 89690e231..aae020075 100644 --- a/docutils/nodes.py +++ b/docutils/nodes.py @@ -244,14 +244,14 @@ class Node: r.append(self) if descend and len(self.children): for child in self: + decend = True if prune_subdocs and isinstance(child, section) and \ child.has_key('source'): - # Include this node but do not descend. - r.append(child) + decend = False else: r.extend(child.traverse( condition=condition, - include_self=1, descend=1, siblings=0, ascend=0, + include_self=1, descend=descend, siblings=0, ascend=0, prune_subdocs=prune_subdocs)) if siblings or ascend: assert not prune_subdocs, \ |
