Skip to content

Commit

Permalink
Extend images regex to also match the appendix after file extension
Browse files Browse the repository at this point in the history
Some images have an appendix after the file extension making the
builtin regex fail.
An example would be something like https://example.com/foo.svg?size=800x600.
  • Loading branch information
Thaodan committed Jun 4, 2022
1 parent 41cdc11 commit aa569ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion circe-display-images.el
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ See `enable-circe-display-images'."
:group 'circe)

(defcustom circe-display-images-image-regex
"\\(https?://[^ ]*?\\.\\(?:png\\|jpg\\|jpeg\\|svg\\|gif\\)\\)"
"\\(https?://[^ ]*?\\.\\(?:png\\|jpg\\|jpeg\\|svg\\|gif\\).*\\)"
"Regex used to find images in channel messages. This regex needs to be
greedy to match multiple images on the same line."
:group 'circe-display-images
Expand Down

0 comments on commit aa569ac

Please # to comment.