From 6a0f5a35804db95e4717e88f560cbbcbf115da03 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 24 May 2021 08:20:37 +0530 Subject: [PATCH] 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) --- src/calibre/gui2/library/annotations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/library/annotations.py b/src/calibre/gui2/library/annotations.py index 4567848aec..9a0985949d 100644 --- a/src/calibre/gui2/library/annotations.py +++ b/src/calibre/gui2/library/annotations.py @@ -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('

{} ({})

'.format(