fix(library): use {% comment %} for multi-line template comments
Django's `{# #}` syntax only supports single-line comments; multi-line
blocks were rendering as literal text in the search and library detail
templates. Replace them with `{% comment %}...{% endcomment %}` blocks
and add a note explaining the distinction.
This commit is contained in:
@@ -146,11 +146,14 @@
|
||||
{% if results_reranked.reranker_used %}
|
||||
<span class="badge badge-success">{{ results_reranked.reranker_model|default:"on" }}</span>
|
||||
{% else %}
|
||||
{# The A/B page always requests rerank=True, so a
|
||||
{% comment %}
|
||||
The A/B page always requests rerank=True, so a
|
||||
negative here is always a skip with a reason —
|
||||
surface the reason in a tooltip so the user
|
||||
knows *why* the B side fell back to fusion
|
||||
order. #}
|
||||
knows *why* the B side fell back to fusion order.
|
||||
Django's ``{# #}`` comment is single-line only;
|
||||
multi-line blocks must use ``{% comment %}``.
|
||||
{% endcomment %}
|
||||
<span class="badge badge-warning"
|
||||
title="{{ results_reranked.reranker_skip_reason|default:'unknown' }}">
|
||||
unavailable
|
||||
|
||||
@@ -81,13 +81,17 @@
|
||||
<div class="stat">
|
||||
<div class="stat-title">Re-ranked</div>
|
||||
<div class="stat-value text-lg">
|
||||
{# Three-state indicator:
|
||||
{% comment %}
|
||||
Three-state indicator:
|
||||
- Yes: re-ranker ran successfully
|
||||
- Skipped (+ tooltip): re-rank was requested but the
|
||||
pipeline bailed — badge colour is a warning so the
|
||||
user knows something didn't work
|
||||
- Off: user unchecked the re-rank box
|
||||
#}
|
||||
Note: Django's ``{# #}`` comment is single-line only;
|
||||
multi-line blocks must use ``{% comment %}`` or they
|
||||
render as literal text.
|
||||
{% endcomment %}
|
||||
{% if results.reranker_used %}
|
||||
<span class="badge badge-success">Yes</span>
|
||||
{% elif results.reranker_skip_reason %}
|
||||
|
||||
Reference in New Issue
Block a user