Skip to content

Commit

Permalink
Only show spellcheck suggestion if at least 1 result, closes #471
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jul 17, 2024
1 parent 2904a1e commit 18bef25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h2>{{ title }}</h2>
{% else %}
{% if selected or q %}
<p><strong>No results found</strong></p>
{% if suggestion %}
{% if suggestion and num_corrected_results %}
<p style="margin: 1em 0">Suggestion: <a href="/search/?q={{ suggestion }}">{{ suggestion }}</a> ({{ num_corrected_results }} result{{ num_corrected_results|pluralize }})</p>
{% endif %}
{% endif %}
Expand Down

0 comments on commit 18bef25

Please sign in to comment.