diff options
| author | 2025-04-01 23:08:48 +0200 | |
|---|---|---|
| committer | 2025-04-13 14:42:02 +0200 | |
| commit | e251c61382d4cd39ed89876a37962acab1122f84 (patch) | |
| tree | eab41e2c808089dce0bdbeea626b21871b7a3cea | |
| parent | the fucking list is sotted. oopps (diff) | |
| download | penes-snac2-e251c61382d4cd39ed89876a37962acab1122f84.tar.gz penes-snac2-e251c61382d4cd39ed89876a37962acab1122f84.tar.xz penes-snac2-e251c61382d4cd39ed89876a37962acab1122f84.zip | |
allow emoji urls with no extension
| -rw-r--r-- | format.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -385,7 +385,8 @@ xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag | |||
| 385 | const char *t = NULL; | 385 | const char *t = NULL; |
| 386 | 386 | ||
| 387 | /* is it an URL to an image? */ | 387 | /* is it an URL to an image? */ |
| 388 | if (xs_startswith(v, "https:/" "/") && xs_startswith((t = xs_mime_by_ext(v)), "image/")) { | 388 | if (xs_startswith(v, "https:/" "/") && |
| 389 | (xs_startswith((t = xs_mime_by_ext(v)), "image/") || strrchr(v, '.') == NULL)) { | ||
| 389 | if (tag && xs_str_in(s, k) != -1) { | 390 | if (tag && xs_str_in(s, k) != -1) { |
| 390 | /* add the emoji to the tag list */ | 391 | /* add the emoji to the tag list */ |
| 391 | xs *e = xs_dict_new(); | 392 | xs *e = xs_dict_new(); |