handle character in the category 'nonspacing mark'
Those characters are ignored, because they decorate the previous character.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user