parent
fd48e29a54
commit
587b11f60d
@ -45,7 +45,7 @@ class _Highlighter(QSyntaxHighlighter):
|
||||
|
||||
def highlightBlock(self, text):
|
||||
"""Override highlightBlock for custom highlighting."""
|
||||
for match in re.finditer(self._pattern, text):
|
||||
for match in re.finditer(self._pattern, text, re.IGNORECASE):
|
||||
start, end = match.span()
|
||||
length = end - start
|
||||
self.setFormat(start, length, self._format)
|
||||
|
@ -28,6 +28,7 @@ from qutebrowser.completion import completiondelegate
|
||||
@pytest.mark.parametrize('pat,txt,segments', [
|
||||
('foo', 'foo', [(0, 3)]),
|
||||
('foo', 'foobar', [(0, 3)]),
|
||||
('foo', 'FOObar', [(0, 3)]), # re.IGNORECASE
|
||||
('foo', 'barfoo', [(3, 3)]),
|
||||
('foo', 'barfoobaz', [(3, 3)]),
|
||||
('foo', 'barfoobazfoo', [(3, 3), (9, 3)]),
|
||||
|
Loading…
Reference in New Issue
Block a user