]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't reject PBM header whitespace unnecessarily
authorAndy Moreton <andrewjmoreton@gmail.com>
Mon, 16 Oct 2017 08:23:32 +0000 (01:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 16 Oct 2017 08:24:27 +0000 (01:24 -0700)
* 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

lisp/image.el

index 1d0776180b2a8acaaea76d5a092d1f9ee57313ca..32df508bc8da8e182bacf09418740ec715c79226 100644 (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)