From 8760b3cf71b3d1a78ae960047eafb8203d6cdeca Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 16 Jan 2022 04:33:31 +0530 Subject: [PATCH] ... --- src/calibre/gui2/viewer/search.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/viewer/search.py b/src/calibre/gui2/viewer/search.py index a1f4e85f59..e645e61ce7 100644 --- a/src/calibre/gui2/viewer/search.py +++ b/src/calibre/gui2/viewer/search.py @@ -173,6 +173,7 @@ def searchable_text_for_name(name): for child in serialized_data['tree']['c']: if child.get('n') == 'body': stack.append(child) + # the JS code does not add the tail of body tags to flat text removed_tails.append((child.pop('l', None), child)) ignore_text = {'script', 'style', 'title'} text_pos = 0