1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

Don't reject PBM header whitespace unnecessarily

* lisp/image.el (image-type-header-regexps):
Allow two or more CRs or LFs in initial whitespace sequences.  See:
http://netpbm.sourceforge.net/doc/pbm.html
This commit is contained in:
Andy Moreton 2017-10-16 01:23:32 -07:00 committed by Paul Eggert
parent 3205b12a78
commit 613db8d35c

View File

@ -34,8 +34,8 @@
(defconst image-type-header-regexps
`(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm)
("\\`P[1-6]\\(?:\
\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[[:space:]]\\)+\
\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[0-9]\\)+\
\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[[:space:]]\\)+\
\\(?:\\(?:#[^\r\n]*[\r\n]\\)*[0-9]\\)+\
\\)\\{2\\}" . pbm)
("\\`GIF8[79]a" . gif)
("\\`\x89PNG\r\n\x1a\n" . png)