From 19a79f35850800930a25f810918ecba0eab41510 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 14 Jan 2017 20:28:24 +0530 Subject: [PATCH] Finish up viewer search --- src/pyj/read_book/resources.pyj | 2 +- src/pyj/read_book/search.pyj | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/resources.pyj b/src/pyj/read_book/resources.pyj index 598ab18f36..d920be72a6 100644 --- a/src/pyj/read_book/resources.pyj +++ b/src/pyj/read_book/resources.pyj @@ -269,7 +269,7 @@ def text_from_serialized_html(data): serialized_data = JSON.parse(data) tag_map = serialized_data.tag_map ans = v'[]' - stack = v'[tree[2]]' + stack = v'[serialized_data.tree[2]]' ignore_text = {'script':True, 'style':True} while stack.length: node = stack.pop() diff --git a/src/pyj/read_book/search.pyj b/src/pyj/read_book/search.pyj index adda9a4e19..c3a93ea486 100644 --- a/src/pyj/read_book/search.pyj +++ b/src/pyj/read_book/search.pyj @@ -95,3 +95,5 @@ def find_in_spine(names, book, db, text, proceed): db.get_file(book, name, got_one) else: proceed(None) + + do_one()