wikitextparser/_wikitext.py
def _close_subspans(self, start: int, stop: int) -> None:
        """Close all sub-spans of (start, stop)."""
        ss, se = self._span
        for spans in self._type_to_spans.values():
            b = bisect(spans, [start])
            for i, (s, e) in enumerate(spans[b:bisect(spans, [stop], b)]):
                if e <= stop:
                    if ss != s or se != e:
                        spans.pop(i + b)[:] = -1, -1
                        b -= 1
def _close_subspans(self, start: int, stop: int) -> None:
        """Close all sub-spans of (start, stop)."""
        ss, se = self._span
        for spans in self._type_to_spans.values():
            b = bisect(spans, [start])
            for i, (s, e) in enumerate(spans[b:bisect(spans, [stop], b)]):
                if e <= stop:
                    if ss != s or se != e:
                        spans.pop(i + b)[:] = -1, -1
                        b -= 1
Close all sub-spans of (start, stop).