summaryrefslogtreecommitdiff
path: root/docutils/transforms
diff options
context:
space:
mode:
authorgoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-04-08 19:44:13 +0000
committergoodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-04-08 19:44:13 +0000
commit850a8250fc1aeaf129da6a15458b45938f34ed37 (patch)
treeb8f435a09453d7b4a42abe210950c125db9f7c1e /docutils/transforms
parentbe2f10a55253e7feb5047f15f505141bfe1d82e8 (diff)
downloaddocutils-850a8250fc1aeaf129da6a15458b45938f34ed37.tar.gz
fixed part of the "contents" directive context problem
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3195 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/transforms')
-rw-r--r--docutils/transforms/parts.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/docutils/transforms/parts.py b/docutils/transforms/parts.py
index 20dbec880..6fc616a03 100644
--- a/docutils/transforms/parts.py
+++ b/docutils/transforms/parts.py
@@ -86,7 +86,8 @@ class Contents(Transform):
startnode = self.startnode.parent.parent
# @@@ generate an error if the startnode (directive) not at
# section/document top-level? Drag it up until it is?
- while not isinstance(startnode, nodes.Structural):
+ while not (isinstance(startnode, nodes.section)
+ or isinstance(startnode, nodes.document)):
startnode = startnode.parent
else:
startnode = self.document