diff --git a/lib/html/static/js/search.js b/lib/html/static/js/search.js index af47ac8ca9..03ecaf555f 100644 --- a/lib/html/static/js/search.js +++ b/lib/html/static/js/search.js @@ -82,6 +82,11 @@ var FileLoader = ( function () { * number. */ num = parseInt(num); + if (previous_search) { + loadFile("", num) + return + } + // Remove previously highlighted lines. var highlights = $($('#filecode')[0]).find('span.highlight'); for (high=0; high {% endif -%} -{% if not file_content -%} -{% set lines = lines | map( - 'replace', 'DEBUG', 'DEBUG') | map( - 'replace', 'INFO', 'INFO') | map( - 'replace', 'ERROR', 'ERROR') | map( - 'replace', 'CRITICAL', 'CRITICAL') | map( - 'replace', 'WARNING', 'WARNING') -%} -{% endif -%}
 {% for line in lines -%}
 {% for part in line -%}
-{% if loop.index % 2 == 1 -%}{{part}}{% else 
--%}{{part}}{% endif -%}
+{% if not file_content -%}
+{% set part = part | replace(
+    'DEBUG', 'DEBUG') | replace(
+    'INFO', 'INFO') | replace(
+    'ERROR', 'ERROR') | replace(
+    'CRITICAL', 'CRITICAL') | replace(
+    'WARNING', 'WARNING') -%}
 {% endif -%}
+{% if loop.index % 2 == 1 -%}{{part}}{% else 
+-%}{{part}}{%
+endif -%}
 {% endfor -%}
 {{ "" }} 
 {% endfor -%}
diff --git a/lib/html/template/rose-bush/view.html b/lib/html/template/rose-bush/view.html
index edf65d14b7..969a1ca5b1 100644
--- a/lib/html/template/rose-bush/view.html
+++ b/lib/html/template/rose-bush/view.html
@@ -60,16 +60,16 @@ 

{{path}}

-{% if not file_content -%} -{% set lines = lines | map( - 'replace', 'DEBUG', 'DEBUG') | map( - 'replace', 'INFO', 'INFO') | map( - 'replace', 'ERROR', 'ERROR') | map( - 'replace', 'CRITICAL', 'CRITICAL') | map( - 'replace', 'WARNING', 'WARNING') -%} -{% endif -%}
 {% for line in lines -%}
+{% if not file_content -%}
+{% set line = line | replace(
+    'DEBUG', 'DEBUG') | replace(
+    'INFO', 'INFO') | replace(
+    'ERROR', 'ERROR') | replace(
+    'CRITICAL', 'CRITICAL') | replace(
+    'WARNING', 'WARNING') -%}
+{% endif -%}
 {% if mode == "tags" -%}
 {{line}}
 {% else -%}