Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

search_suggestion: Move search description html into helper function.

Evy Kassirer0e86b01c5bb2
diff --git a/web/src/search_suggestion.ts b/web/src/search_suggestion.ts
index 35c39695ed3..d34f105bc2e 100644
--- a/web/src/search_suggestion.ts
+++ b/web/src/search_suggestion.ts
@@ -1029,6 +1029,10 @@ class Attacher {
}
}
+export function search_term_description_html(item: NarrowTerm): string {
+ return `search for ${Handlebars.Utils.escapeExpression(item.operand)}`;
+}
+
export function get_search_result(
pill_search_terms: NarrowTerm[],
text_search_terms: NarrowTerm[],
@@ -1083,7 +1087,7 @@ export function get_search_result(
suggestion_line = [
{
search_string: last.operand,
- description_html: `search for ${Handlebars.Utils.escapeExpression(last.operand)}`,
+ description_html: search_term_description_html(last),
is_people: false,
},
];