DEV: No need to highlight search if PG headline generation is used.

DEV: No need to highlight search if PG headline generation is used.

diff --git a/app/assets/javascripts/admin/templates/search-logs-term.hbs b/app/assets/javascripts/admin/templates/search-logs-term.hbs
index 54348ae..50b58ec 100644
--- a/app/assets/javascripts/admin/templates/search-logs-term.hbs
+++ b/app/assets/javascripts/admin/templates/search-logs-term.hbs
@@ -54,9 +54,13 @@
             </span>
 
             {{#if result.blurb}}
-              {{#highlight-search highlight=term}}
+              {{#if siteSettings.use_pg_headlines_for_excerpt}}
                 {{html-safe result.blurb}}
-              {{/highlight-search}}
+              {{else}}
+                {{#highlight-search highlight=highlightQuery}}
+                  {{html-safe result.blurb}}
+                {{/highlight-search}}
+              {{/if}}
             {{/if}}
           </div>
         </div>
diff --git a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs
index 7d7b70c..dedf5be 100644
--- a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs
+++ b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs
@@ -112,9 +112,13 @@
                   </span>
 
                   {{#if result.blurb}}
-                    {{#highlight-search highlight=highlightQuery}}
+                    {{#if siteSettings.use_pg_headlines_for_excerpt}}
                       {{html-safe result.blurb}}
-                    {{/highlight-search}}
+                    {{else}}
+                      {{#highlight-search highlight=highlightQuery}}
+                        {{html-safe result.blurb}}
+                      {{/highlight-search}}
+                    {{/if}}
                   {{/if}}
                 </div>
 

GitHub sha: 1d2ba8fd