Content server viewer: Fix a regression in the previous release that broke searching. Fixes #2067128 [[Content Server Viewer] In-book search fails in version 7.11](https://bugs.launchpad.net/calibre/+bug/2067128)

This commit is contained in:
Kovid Goyal 2024-05-25 09:52:36 +05:30
parent 41bb502022
commit f3b35c318f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -412,12 +412,12 @@ def text_from_serialized_html(data, get_anchor_offset_map):
ignore_text = {'img': True, 'math': True, 'rt': True, 'rp': True, 'rtc': True} ignore_text = {'img': True, 'math': True, 'rt': True, 'rp': True, 'rtc': True}
ignore_text ignore_text
if tag_map: if tag_map:
stack = v'[[serialized_data.tree[2], False]]' stack = v'[[serialized_data.tree[2], false]]'
else: else:
stack = v'[]' stack = v'[]'
for child in serialized_data.tree.c: for child in serialized_data.tree.c:
if child.n is 'body': if child.n is 'body':
stack.push(v'[child, False]') stack.push(v'[child, false]')
anchor_offset_map = {} anchor_offset_map = {}
text_pos = 0 text_pos = 0
while stack.length: while stack.length: