Skip to main content

process_doc

Function process_doc 

Source
pub fn process_doc(
    env: &mut BuildEnvironment,
    docname: &str,
    doctree: &mut Doctree,
    path: &Path,
    warnings: &mut Vec<BuildWarning>,
)
Expand description

IndexDomain.process_doc (domains/index.py:48-61).

Harvests every index node’s entries into env.index_entries[docname], in document order. A node carrying an entry split_index_msg rejects warns once and is removed from the doctree, contributing none of its entries — Sphinx wraps the whole per-node validation loop in one try, so a single bad entry discards the node’s good ones too.

The docname’s (possibly empty) entry list is created unconditionally (self.entries.setdefault(...)), which is why a document with no index nodes at all still appears in env.index_entries.