mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
Leave casing alone in search suggestions.
The function narrow.unparse() is used in a bunch of places in the search suggestion code, and now it no longer lower cases operands. This change contributes to fixing trac #1659. (imported from commit 6b44b8a818482b5c8b4f9a45bc7d3a9d21e04eba)
This commit is contained in:
@@ -73,7 +73,7 @@ exports.unparse = function (operators) {
|
||||
// a colon are glued together to form a search term.
|
||||
return elem[1];
|
||||
} else {
|
||||
return elem[0] + ':' + encodeOperand(elem[1].toString().toLowerCase());
|
||||
return elem[0] + ':' + encodeOperand(elem[1]);
|
||||
}
|
||||
});
|
||||
return parts.join(' ');
|
||||
|
||||
@@ -19,7 +19,7 @@ var stream_data = global.stream_data;
|
||||
|
||||
assert.deepEqual(narrow.parse(string), operators);
|
||||
|
||||
string = 'stream:foo topic:bar yo';
|
||||
string = 'stream:Foo topic:Bar yo';
|
||||
assert.deepEqual(narrow.unparse(operators), string);
|
||||
}());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user