$def with(query, results, page=1) $def render_snippet(query, doc): $:macros.FulltextSuggestionSnippet(query, doc=doc) $if results and results.get('hits'): $ hits = results['hits'].get('hits', [])[:4] $ num_found = commify(results['hits'].get('total', 0)) $:macros.LoadingIndicator(_("Checking for Search Inside matches"))
$_('search inside icon')

$_("Search Inside") — $_('%(book_count)s books found with matching passages', book_count=num_found)

$for doc in hits: $if doc.get('edition'): $:macros.FulltextSearchSuggestionItem(doc['edition'], snippet=render_snippet(query, doc))