Annotations browser: When showing a highlight preserve paragraph boundaries for multi-paragraph highlights. Fixes #1909730 [Enhancement Request: Render newlines in Annotation Browser.](https://bugs.launchpad.net/calibre/+bug/1909730)

This commit is contained in:
Kovid Goyal 2021-05-24 08:20:37 +05:30
parent 8e0ba51fd3
commit 6a0f5a3580
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -758,7 +758,8 @@ class DetailsPanel(QWidget):
if annot['type'] == 'bookmark':
p(annot['title'])
elif annot['type'] == 'highlight':
p(annot['highlighted_text'])
for line in annot['highlighted_text'].splitlines():
p(line)
notes = annot.get('notes')
if notes:
paras.append('<h4>{} (<a title="{}" href="calibre://edit_result">{}</a>)</h4>'.format(