Skip to main content

resolve_entries

Function resolve_entries 

Source
pub fn resolve_entries(input: &ToctreeContent<'_>) -> ResolvedEntries
Expand description

Resolve a toctree directive’s content lines against the document set.

Exact port of TocTree.parse_content (sphinx/directives/other.py:88-179), including all four of its logger.warning calls — they come back on ResolvedEntries::warnings instead of going to a logger, because this runs inside the parser. This is the project’s only toctree resolver: the build’s user-visible toctree diagnostics are exactly these warnings, so what warns and what resolves can never disagree.

The one deliberate addition is ToctreeWarningKind::PatternError, which has no Sphinx counterpart (see its doc comment).

Not ported: env.note_reread() on a missing entry (nothing consumes the re-read set yet).