* lisp/image/image-converter.el: Support more ImageMagick versions (bug#39994)

* lisp/image/image-converter.el (image-converter--probe): Match
a possible additional second column in some ImageMagick versions
of "convert -list format".
This commit is contained in:
Juri Linkov 2020-03-15 01:58:58 +02:00
parent 5beb269505
commit f8254aad14

View file

@ -149,8 +149,9 @@ data is returned as a string."
(when (re-search-forward "^-" nil t) (when (re-search-forward "^-" nil t)
(forward-line 1) (forward-line 1)
;; Lines look like ;; Lines look like
;; " WPG* r-- Word Perfect Graphics". ;; " WPG* r-- Word Perfect Graphics" or
(while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*? +r" nil t) ;; " WPG* WPG r-- Word Perfect Graphics".
(while (re-search-forward "^ *\\([A-Z0-9]+\\)\\*?\\(?: +[A-Z0-9]+\\)? +r" nil t)
(push (downcase (match-string 1)) formats))) (push (downcase (match-string 1)) formats)))
(nreverse formats)))) (nreverse formats))))