Author: adam-guest
Date: 2008-03-17 19:01:18 +0000 (Mon, 17 Mar 2008)
New Revision: 1161

Modified:
   trunk/debian/changelog
   trunk/scripts/checkbashisms.pl
Log:
  + Don't treat '' at the beginning of a line as the start of a quoted block

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-03-17 18:45:40 UTC (rev 1160)
+++ trunk/debian/changelog      2008-03-17 19:01:18 UTC (rev 1161)
@@ -8,6 +8,7 @@
     + Fix an error in the "shell script wrapper" detection
     + Enhance the "invalid function name" check to allow a leading bracket
       before the function name
+    + Don't treat '' at the beginning of a line as the start of a quoted block
 
  -- Adam D. Barratt <[EMAIL PROTECTED]>  Sun, 16 Mar 2008 19:40:40 +0000
 

Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl      2008-03-17 18:45:40 UTC (rev 1160)
+++ trunk/scripts/checkbashisms.pl      2008-03-17 19:01:18 UTC (rev 1161)
@@ -233,7 +233,7 @@
                    my $otherquote = ($quote eq "\"" ? "\'" : "\"");
                    # Remove "" / '' as they clearly aren't quoted strings
                    # and not considering them makes the matching easier
-                   $templine =~ s/([^\\])($quote$quote)/$1/g;
+                   $templine =~ s/(^|[^\\])($quote$quote)/$1/g;
                    # Don't flag quotes that are themselves quoted
                    $templine =~ s/$otherquote.*?$quote.*?$otherquote//g;
                    my $count = () = $templine =~ /(^|[^\\])$quote/g;



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to