From: <go...@us...> - 2005-04-08 19:44:24
|
Author: goodger Date: 2005-04-08 21:44:13 +0200 (Fri, 08 Apr 2005) New Revision: 3195 Modified: trunk/docutils/docutils/transforms/parts.py Log: fixed part of the "contents" directive context problem Modified: trunk/docutils/docutils/transforms/parts.py =================================================================== --- trunk/docutils/docutils/transforms/parts.py 2005-04-08 18:43:33 UTC (rev 3194) +++ trunk/docutils/docutils/transforms/parts.py 2005-04-08 19:44:13 UTC (rev 3195) @@ -86,7 +86,8 @@ 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 |