diff --git a/myst_parser/mdit_to_docutils/base.py b/myst_parser/mdit_to_docutils/base.py index 49c3fd22..ab720484 100644 --- a/myst_parser/mdit_to_docutils/base.py +++ b/myst_parser/mdit_to_docutils/base.py @@ -381,7 +381,7 @@ def add_line_and_source_path_r( """ for node in nodes: self.add_line_and_source_path(node, token) - for child in node.traverse(): + for child in findall(node)(): self.add_line_and_source_path(child, token) def update_section_level_state(self, section: nodes.section, level: int) -> None: diff --git a/myst_parser/sphinx_ext/myst_refs.py b/myst_parser/sphinx_ext/myst_refs.py index 9ba223d6..f3643459 100644 --- a/myst_parser/sphinx_ext/myst_refs.py +++ b/myst_parser/sphinx_ext/myst_refs.py @@ -151,11 +151,7 @@ def resolve_myst_ref( except NotImplementedError: # the domain doesn't yet support the new interface # we have to manually collect possible references (SLOW) - if not ( - getattr(domain, "__module__", "").startswith("sphinx.") - # TODO glue can be removed when myst-nb fixed - or "glue" in getattr(domain, "__module__", "") - ): + if not (getattr(domain, "__module__", "").startswith("sphinx.")): logger.warning( f"Domain '{domain.__module__}::{domain.name}' has not " "implemented a `resolve_any_xref` method [myst.domains]",