diff --git a/trac/ticket/templates/query_results.html b/trac/ticket/templates/query_results.html
index 1927ac4100..a34dbddcb4 100644
--- a/trac/ticket/templates/query_results.html
+++ b/trac/ticket/templates/query_results.html
@@ -34,7 +34,9 @@
# endset
${tag_("Results %(num)s", num=numresults)}
# endif
- # include 'page_index.html' if paginator.show_index
+ # if paginator.show_index:
+ # include 'page_index.html'
+ # endif
# macro group_heading(groupname, results)
# if groupname is not none:
@@ -199,5 +201,7 @@
# endfor
# endwith
- # include 'page_index.html' if paginator.show_index
+ # if paginator.show_index:
+ # include 'page_index.html'
+ # endif