def handle_endtag(self, tag: str) -> None:
        """Called at the end of every HTML tag."""
        # We only care about the opening tag for headings.
        if tag not in _HEADER_TAGS:
            return

        self.is_header_tag = False
Called at the end of every HTML tag.
mkdocs/contrib/search/search_index.py