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.

topic_link_util: Use different escape sequence for backticks.

Kislay Udbhav Verma81c4e45d01df
diff --git a/web/src/topic_link_util.ts b/web/src/topic_link_util.ts
index 95bc1412cbb..320f36e6893 100644
--- a/web/src/topic_link_util.ts
+++ b/web/src/topic_link_util.ts
@@ -19,7 +19,7 @@ function get_stream_name_from_topic_link_syntax(syntax: string): string {
export function escape_invalid_stream_topic_characters(text: string): string {
switch (text) {
case "`":
- return "`";
+ return "`";
case ">":
return ">";
case "*":
diff --git a/web/tests/topic_link_util.test.js b/web/tests/topic_link_util.test.js
index b38910fd334..d1ba594390a 100644
--- a/web/tests/topic_link_util.test.js
+++ b/web/tests/topic_link_util.test.js
@@ -47,11 +47,11 @@ run_test("stream_topic_link_syntax_test", () => {
);
assert.equal(
topic_link_util.get_stream_topic_link_syntax("#**Sweden>t", "test `test` test"),
- "[#Sweden>test `test` test](#narrow/channel/1-Sweden/topic/test.20.60test.60.20test)",
+ "[#Sweden>test `test` test](#narrow/channel/1-Sweden/topic/test.20.60test.60.20test)",
);
assert.equal(
topic_link_util.get_stream_topic_link_syntax("#**Denmark>t", "test `test` test`s"),
- "[#Denmark>test `test` test`s](#narrow/channel/2-Denmark/topic/test.20.60test.60.20test.60s)",
+ "[#Denmark>test `test` test`s](#narrow/channel/2-Denmark/topic/test.20.60test.60.20test.60s)",
);
assert.equal(
topic_link_util.get_stream_topic_link_syntax("#**Sweden>typeah", "error due to *"),