summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAndy Moreton <andrewjmoreton@gmail.com>2017-10-16 01:23:32 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-10-16 01:24:27 -0700
commit613db8d35c3d080fd059dfc8cf668520bf6950d2 (patch)
tree6eb2c32560d80e805054de57c5dfe532bf7f03e7 /lisp
parent3205b12a78b6c52b247d8e40a70ccf23693807c5 (diff)
downloademacs-613db8d35c3d080fd059dfc8cf668520bf6950d2.tar.gz
emacs-613db8d35c3d080fd059dfc8cf668520bf6950d2.tar.bz2
emacs-613db8d35c3d080fd059dfc8cf668520bf6950d2.zip
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
Diffstat (limited to 'lisp')
-rw-r--r--lisp/image.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/image.el b/lisp/image.el
index 1d0776180b2..32df508bc8d 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -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)