mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Display full annotation text in details panel
This commit is contained in:
parent
70f1540484
commit
572341e632
@ -391,14 +391,15 @@ class DetailsPanel(QWidget):
|
|||||||
annot_text = ''
|
annot_text = ''
|
||||||
a = prepare_string_for_xml
|
a = prepare_string_for_xml
|
||||||
|
|
||||||
for part in r['text'].split('\n\x1f\n'):
|
paras = []
|
||||||
segments = []
|
if annot['type'] == 'bookmark':
|
||||||
for bit in part.split('\x1d'):
|
paras.append(annot['title'])
|
||||||
segments.append(a(bit) + ('</b>' if len(segments) % 2 else '<b>'))
|
elif annot['type'] == 'highlight':
|
||||||
stext = ''.join(segments)
|
paras.append(annot['highlighted_text'])
|
||||||
if stext.endswith('<b>'):
|
paras.append(annot.get('notes') or '')
|
||||||
stext = stext[:-3]
|
|
||||||
annot_text += '<div style="text-align:left">' + stext + '</div><div> </div>'
|
for para in paras:
|
||||||
|
annot_text += '<div style="text-align:left">' + para + '</div><div> </div>'
|
||||||
|
|
||||||
date = parse_iso8601(annot['timestamp']).strftime('%Y-%m-%d %H:%M:%S')
|
date = parse_iso8601(annot['timestamp']).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
text = '''
|
text = '''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user