mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix build failure for Docutils 0.18.0 (#10597)
This commit is contained in:
parent
4b482334a2
commit
5a24fec8de
2
CHANGES
2
CHANGES
@ -17,6 +17,8 @@ Bugs fixed
|
||||
----------
|
||||
|
||||
* #10594: HTML Theme: field term colons are doubled if using Docutils 0.18+
|
||||
* #10596: Build failure if Docutils version is 0.18 (not 0.18.1) due
|
||||
to missing ``Node.findall()``
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -550,9 +550,9 @@ class SphinxTranslator(nodes.NodeVisitor):
|
||||
|
||||
|
||||
# Node.findall() is a new interface to traverse a doctree since docutils-0.18.
|
||||
# This applies a patch docutils-0.17 or older to be available Node.findall()
|
||||
# This applies a patch to docutils up to 0.18 inclusive to provide Node.findall()
|
||||
# method to use it from our codebase.
|
||||
if docutils.__version_info__ < (0, 18):
|
||||
if docutils.__version_info__ <= (0, 18):
|
||||
def findall(self, *args, **kwargs):
|
||||
return iter(self.traverse(*args, **kwargs))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user