aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/templates/search_macros.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-01-13 18:05:48 -0800
committerBryan Newbold <bnewbold@archive.org>2021-01-14 14:57:14 -0800
commit6b88ede6b74301afbd12ff616fe806d2c5e7784b (patch)
tree8484c77939fb04fbcfcb60b01b5befac1e8b606f /fatcat_scholar/templates/search_macros.html
parent6a26a977fa05e63437bc126a917f46495b5a620f (diff)
downloadfatcat-scholar-6b88ede6b74301afbd12ff616fe806d2c5e7784b.tar.gz
fatcat-scholar-6b88ede6b74301afbd12ff616fe806d2c5e7784b.zip
search: show fewer, shorter highlights. sort by score.
Diffstat (limited to 'fatcat_scholar/templates/search_macros.html')
-rw-r--r--fatcat_scholar/templates/search_macros.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html
index d3dc854..6346754 100644
--- a/fatcat_scholar/templates/search_macros.html
+++ b/fatcat_scholar/templates/search_macros.html
@@ -113,7 +113,7 @@
{# this highlight HTML escape hacking should not be necessary in ES 7.x with highlight escaping #}
{# but for now we manually escape, then de-escape the 'em' highlight tags #}
{% autoescape false %}
- {% for highlight in paper._highlights %}
+ {% for highlight in paper._highlights[:3] %}
{{ highlight|e|replace("&lt;em&gt;", "<em>")|replace("&lt;/em&gt;", "</em>") }} &nbsp;...&nbsp;
{% endfor %}
{% endautoescape %}