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.

zcommands: Fully parse messages from the server.

Steve Howell38a3d89a1333
diff --git a/static/js/markdown.js b/static/js/markdown.js
index ab78576a50d..82f48dc0197 100644
--- a/static/js/markdown.js
+++ b/static/js/markdown.js
@@ -567,6 +567,8 @@ export function apply_markdown(message) {
export function parse_non_message(raw_content) {
// Occasionally we get markdown from the server that is not technically
- // a message, but we want to convert it to HTML.
- return marked(raw_content).trim();
+ // a message, but we want to convert it to HTML. Note that we parse
+ // raw_content exactly as if it were a Zulip message, so we will
+ // handle things like mentions, stream links, and linkifiers.
+ return parse({raw_content, helper_config: webapp_helpers}).content;
}