(self, log_event: str)
| 153 | return log_event[:start] + string_without_color + log_event[end:] |
| 154 | |
| 155 | def highlight(self, log_event: str): |
| 156 | matchings = list(self._regex_pattern.finditer(log_event.lower()))[::-1] |
| 157 | self._occurrence_count += len(matchings) |
| 158 | for match in matchings: |
| 159 | log_event = self._add_color_to_string( |
| 160 | log_event, match.start(), match.end() |
| 161 | ) |
| 162 | |
| 163 | return log_event |
| 164 | |
| 165 | def remove_highlighting(self, log_event: str): |
| 166 | matchings = list( |