From 6b88ede6b74301afbd12ff616fe806d2c5e7784b Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 13 Jan 2021 18:05:48 -0800 Subject: search: show fewer, shorter highlights. sort by score. --- fatcat_scholar/templates/search_macros.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fatcat_scholar/templates/search_macros.html') 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("<em>", "")|replace("</em>", "") }}  ...  {% endfor %} {% endautoescape %} -- cgit v1.2.3