handle character in the category 'nonspacing mark'

Those characters are ignored, because they decorate
the previous character.
This commit is contained in:
2022-01-29 10:43:23 +01:00
parent a413134f68
commit f0c3d34995
7 changed files with 132 additions and 26 deletions

View File

@@ -22,6 +22,8 @@ class HighlightRegex(Highlight):
self.regex = self._get_regex()
self.hit_background_color = hit_background_color
self.line_background_color = line_background_color
self._brush_hit = self.brush(self.hit_background_color)
self._brush_line = self.brush(self.line_background_color)
def _get_regex(self):
flags = re.IGNORECASE if self.ignore_case else 0
@@ -46,8 +48,8 @@ class HighlightRegex(Highlight):
start_column,
end_column - start_column,
highlight_full_line=True,
brush=self.brush(self.hit_background_color),
brush_full_line=self.brush(self.line_background_color)
brush=self._brush_hit,
brush_full_line=self._brush_line
))
return result