mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
search_suggestion: Fix highlighting for multi-word streams.
I deleted a test case that involved a highlighted stream, but the query was empty. This produces kind of a weird result with typeahead_helper.highlight_with_escaping, but this function already has coverage in node_tests/typeahead_helper.js, so the check here was essentially redundant anyway. Specifically, the highlighter wraps every character individually with <strong>, and looks really messy in html.
This commit is contained in:
@@ -467,7 +467,6 @@ init();
|
||||
assert.equal(describe('is:alerted'), 'Alerted messages');
|
||||
assert.equal(describe('is:unread'), 'Unread messages');
|
||||
assert.equal(describe('sender:bob@zulip.com'), 'Sent by me');
|
||||
assert.equal(describe('stream:devel'), 'Stream <strong>devel</strong>');
|
||||
}());
|
||||
|
||||
(function test_sent_by_me_suggestions() {
|
||||
|
||||
@@ -97,7 +97,7 @@ function get_stream_suggestions(last, operators) {
|
||||
|
||||
var objs = _.map(streams, function (stream) {
|
||||
var prefix = 'stream';
|
||||
var highlighted_stream = typeahead_helper.highlight_query_in_phrase(query, stream);
|
||||
var highlighted_stream = typeahead_helper.highlight_with_escaping(query, stream);
|
||||
var description = prefix + ' ' + highlighted_stream;
|
||||
var term = {
|
||||
operator: 'stream',
|
||||
|
||||
Reference in New Issue
Block a user