Skip to content

Commit

Permalink
Merge pull request #812 from jakobandersen/visitor-extensions
Browse files Browse the repository at this point in the history
Make NodeFinder actually do sparse visitation
  • Loading branch information
jakobandersen authored Feb 24, 2022
2 parents 5ce136a + 226cdf5 commit 60a2c67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Change Log

Inspired by `Keepachangelog.com <http://keepachangelog.com/>`__.

- Unreleased

- Fix internal ``NodeFinder`` visitor for when non-Docutils nodes are
present in the content of a directive.
`#812 <https://github.com/michaeljones/breathe/pull/812>`__

- 2022-02-14 - **Breathe v4.33.1**

- Avoid warning about multiple graphviz directives.
Expand Down
6 changes: 6 additions & 0 deletions breathe/renderer/sphinxrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ def visit_desc_signature_line(self, node):

def visit_desc_content(self, node):
self.content = node
# The SparseNodeVisitor seems to not actually be universally Sparse,
# but only for nodes known to Docutils.
# So if there are extensions with new node types in the content,
# then the visitation will fail.
# We anyway don't need to visit the actual content, so skip it.
raise nodes.SkipChildren


def intersperse(iterable, delimiter):
Expand Down

0 comments on commit 60a2c67

Please sign in to comment.