Record each offset passed to the processor's compiled expression.
| 754 | |
| 755 | |
| 756 | class _InlineProcessorThatRecordsSearchIndex(inlinepatterns.InlineProcessor): |
| 757 | """Record each offset passed to the processor's compiled expression.""" |
| 758 | |
| 759 | def __init__(self, pattern, md): |
| 760 | super().__init__(pattern, md) |
| 761 | self.start_indices = [] |
| 762 | |
| 763 | def getCompiledRegExp(self): |
| 764 | return _RecordingPattern(self.compiled_re, self.start_indices) |
| 765 | |
| 766 | def handleMatch(self, m, data): |
| 767 | return m.group(0), m.start(0), m.end(0) |
| 768 | |
| 769 | |
| 770 | class TestConfigParsing(unittest.TestCase): |
no outgoing calls