mirror of https://github.com/zulip/zulip.git
markdown: Fix backend rendering regex.
An image link such as [example](http://www.example.com/example.png) is supposed to be inlined by the backend. The regex backend_only_markdown_re in markdown.js does not recognize this link as an image link, causing issues when adding fixtures to zerver/fixtures/markdown_test_cases.json .
This commit is contained in:
parent
1a83b32da5
commit
25b32a5ed7
|
@ -16,8 +16,8 @@ var backend_only_markdown_re = [
|
||||||
// Inline image previews, check for contiguous chars ending in image suffix
|
// 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
|
// 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)\)?)\s+/m,
|
||||||
/[^\s]*(?:\.bmp|\.gif|\.jpg|\.jpeg|\.png|\.webp)$/m,
|
/[^\s]*(?:(?:\.bmp|\.gif|\.jpg|\.jpeg|\.png|\.webp)\)?)$/m,
|
||||||
|
|
||||||
// Twitter and youtube links are given previews
|
// Twitter and youtube links are given previews
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue