fragments with motifs in search results
[wolnelektury.git] / src / search / templatetags / search_tags.py
index ea8d4ed..f03aa67 100644 (file)
@@ -25,7 +25,7 @@ def book_searched(context, result):
     # We don't need hits which lead to sections but do not have
     # snippets.
     hits = filter(lambda (idx, h):
-                  result.snippets[idx] is not None,
+                  result.snippets[idx] is not None or 'fragment' in h,
                   enumerate(result.hits))
     # print "[tmpl: from %d hits selected %d]" % (len(result.hits), len(hits))