diff --git a/src/calibre/gui2/library/annotations.py b/src/calibre/gui2/library/annotations.py index 283415bd8f..18efe602a0 100644 --- a/src/calibre/gui2/library/annotations.py +++ b/src/calibre/gui2/library/annotations.py @@ -391,14 +391,15 @@ class DetailsPanel(QWidget): annot_text = '' a = prepare_string_for_xml - for part in r['text'].split('\n\x1f\n'): - segments = [] - for bit in part.split('\x1d'): - segments.append(a(bit) + ('' if len(segments) % 2 else '')) - stext = ''.join(segments) - if stext.endswith(''): - stext = stext[:-3] - annot_text += '
' + stext + '
 
' + paras = [] + if annot['type'] == 'bookmark': + paras.append(annot['title']) + elif annot['type'] == 'highlight': + paras.append(annot['highlighted_text']) + paras.append(annot.get('notes') or '') + + for para in paras: + annot_text += '
' + para + '
 
' date = parse_iso8601(annot['timestamp']).strftime('%Y-%m-%d %H:%M:%S') text = '''