mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
1956dc9967
commit
cbe213a2aa
@ -606,6 +606,8 @@ class ResultDetails(QWidget):
|
||||
|
||||
def render_results(self, results, individual_match=None):
|
||||
html = []
|
||||
space_pat = re.compile(r'\s+')
|
||||
markup_pat = re.compile('\x1d')
|
||||
|
||||
def markup_text(text):
|
||||
count = 0
|
||||
@ -615,7 +617,7 @@ class ResultDetails(QWidget):
|
||||
count += 1
|
||||
return '<b><i>' if count % 2 else '</i></b>'
|
||||
|
||||
return re.sub('\x1d', sub, re.sub(r'\s+', ' ', text))
|
||||
return space_pat.sub(' ', markup_pat.sub(sub, text))
|
||||
|
||||
ci = self.current_individual_match
|
||||
for i, (result, formats) in enumerate(zip(results.result_dicts, results.formats)):
|
||||
|
Loading…
x
Reference in New Issue
Block a user