Fix section counting/targetting from search snippet
[wolnelektury.git] / wolnelektury / templates / catalogue / book_searched.html
index 935f332..1a345ed 100644 (file)
@@ -8,7 +8,7 @@
 <div class="snippets">
   {% for hit in hits %}
   {% if hit.snippets %}
 <div class="snippets">
   {% for hit in hits %}
   {% if hit.snippets %}
-  <div class="snippet-text"><a href="{% url book_text book.slug %}">{{hit.snippets.0|safe}}</a></div>
+  <div class="snippet-text"><a href="{% url book_text book.slug %}#sec{{hit.section_number}}">{{hit.snippets.0|safe}}</a></div>
   {% else %}
   {% if hit.fragment %}
   <div class="snippet-text">
   {% else %}
   {% if hit.fragment %}
   <div class="snippet-text">