Merge remote-tracking branch 'origin/pr/3510'
This commit is contained in:
commit
961eebaf71
@ -203,9 +203,9 @@ class CompletionItemDelegate(QStyledItemDelegate):
|
||||
columns_to_filter = index.model().columns_to_filter(index)
|
||||
if index.column() in columns_to_filter and pattern:
|
||||
repl = r'<span class="highlight">\g<0></span>'
|
||||
text = re.sub(re.escape(pattern).replace(r'\ ', r'|'),
|
||||
repl, html.escape(self._opt.text),
|
||||
flags=re.IGNORECASE)
|
||||
pat = html.escape(re.escape(pattern)).replace(r'\ ', r'|')
|
||||
txt = html.escape(self._opt.text)
|
||||
text = re.sub(pat, repl, txt, flags=re.IGNORECASE)
|
||||
self._doc.setHtml(text)
|
||||
else:
|
||||
self._doc.setPlainText(self._opt.text)
|
||||
|
Loading…
Reference in New Issue
Block a user