Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
typeahead: Add non breaking space (\u00a0) to list of word separators.
N-Shar-madcf2c67f2d08
diff --git a/web/src/composebox_typeahead.ts b/web/src/composebox_typeahead.tsindex 84da4884d39..8e6a7e03138 100644--- a/web/src/composebox_typeahead.ts+++ b/web/src/composebox_typeahead.ts@@ -769,7 +769,7 @@ export function get_candidates(// already-completed object.// We will likely want to extend this list to be more i18n-friendly.- const terminal_symbols = ",.;?!()[]> \"'\n\t";+ const terminal_symbols = ",.;?!()[]> \u00A0\"'\n\t";if (rest !== "" && !terminal_symbols.includes(rest[0]!)) {return [];}diff --git a/web/tests/composebox_typeahead.test.js b/web/tests/composebox_typeahead.test.jsindex 3705e0de77e..30938554535 100644--- a/web/tests/composebox_typeahead.test.js+++ b/web/tests/composebox_typeahead.test.js@@ -1816,7 +1816,7 @@ test("begins_typeahead", ({override, override_rewire}) => {assert_typeahead_equals(":test", "ing", []);assert_typeahead_equals("```test", "ing", []);assert_typeahead_equals("~~~test", "ing", []);- const terminal_symbols = ",.;?!()[]> \"'\n\t";+ const terminal_symbols = ",.;?!()[]> \u00A0\"'\n\t";for (const symbol of terminal_symbols.split()) {assert_typeahead_equals("@othello",