Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
markdown: Combine regexes.
Aman Agrawalde2b1adfe610
diff --git a/web/src/markdown.js b/web/src/markdown.jsindex f39f72669d9..890d5756194 100644--- a/web/src/markdown.js+++ b/web/src/markdown.js@@ -19,8 +19,7 @@ const preview_regexes = [// Inline image previews, check for contiguous chars ending in image suffix// To keep the below regexes simple, split them out for the end-of-message case- /\S*(?:\.bmp|\.gif|\.jpg|\.jpeg|\.png|\.webp)\)?\s+/m,- /\S*(?:\.bmp|\.gif|\.jpg|\.jpeg|\.png|\.webp)\)?$/m,+ /\S*(?:\.bmp|\.gif|\.jpg|\.jpeg|\.png|\.webp)\)?(\s+|$)/m,// Twitter and youtube links are given previews