From: Eric S. Raymond Date: Sat, 15 Nov 2003 15:45:43 +0000 (+0000) Subject: tidy fix. X-Git-Tag: 2.5 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=9daab5dbc4f59596376cd2369b9dc73fc42fc0e4;p=imgsizer.git tidy fix. --- diff --git a/imgsizer b/imgsizer index 3ee339e..50336fd 100755 --- a/imgsizer +++ b/imgsizer @@ -64,6 +64,8 @@ # Enhancement by ESR, 14 Nov 2003 # # Verify and merge Lucien Saviot's patch to produce XHTML from XHTML input. +# Also his change to handle spurious lin e breaks produced by Dave Raggett's +# tidy(1) utility. import sys, os, getopt, string, re, urllib, commands @@ -188,7 +190,7 @@ def imgsize(src): # All attempts failed sys.stderr.write("imgsizer: couldn't analyze %s\n" % src) -source = re.compile('SRC="?([^" \t\n]*)"?', re.I) +source = re.compile('SRC\s*=\s*"?([^" \t\n]*)"?', re.I) awidth = re.compile(r' *WIDTH\s*=\s*"?[0-9]*"?', re.I) aheight = re.compile(r' *HEIGHT\s*=\s*"?[0-9]*"?', re.I) pwidth = re.compile(r'WIDTH\s*=\s*"?[0-9]*%"?', re.I)