diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2021-05-18 21:34:11 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2021-05-18 21:34:11 +0000 |
| commit | 7ea554e5b131c0d0770571f4418e669dba67e186 (patch) | |
| tree | 0e27c299e01728fb28892e0e346771329bbc75ba /docutils/transforms | |
| parent | d5847827dc75a439b9ed05c57081a0e27df26022 (diff) | |
| download | docutils-7ea554e5b131c0d0770571f4418e669dba67e186.tar.gz | |
``nodes.Node.traverse()`` now returns an iterator instead of a list.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8730 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/transforms')
| -rw-r--r-- | docutils/transforms/frontmatter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docutils/transforms/frontmatter.py b/docutils/transforms/frontmatter.py index add5390f0..a1dc060fb 100644 --- a/docutils/transforms/frontmatter.py +++ b/docutils/transforms/frontmatter.py @@ -281,10 +281,10 @@ class SectionSubTitle(TitlePromoter): def apply(self): if not self.document.settings.setdefault('sectsubtitle_xform', True): return - for section in self.document._traverse(nodes.section): + for section in self.document.traverse(nodes.section): # On our way through the node tree, we are modifying it # but only the not-yet-visited part, so that the iterator - # returned by _traverse() is not corrupted. + # returned by traverse() is not corrupted. self.promote_subtitle(section) |
