Get a cached result.
(self, pos: int, data: str)
| 802 | self.reset() |
| 803 | |
| 804 | def get_cached_result(self, pos: int, data: str) -> tuple[etree.Element, int, int]: |
| 805 | """Get a cached result.""" |
| 806 | |
| 807 | # Process the next region(s) in the cache |
| 808 | regions = self.regions |
| 809 | offset = pos - self.cache_pos if pos != self.cache_pos else pos - regions[self.cache_index][0] |
| 810 | start, end = regions[self.cache_index][0], regions[self.cache_index][3] |
| 811 | el, count = self._build_element(data, self.cache_index, offset) |
| 812 | self.increment_next_position(start, count) |
| 813 | return el, start + offset, end + offset |
| 814 | |
| 815 | @staticmethod |
| 816 | def rule_of_3(opener: int, closer: int) -> bool: |
no test coverage detected