[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.85,1.86"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Fri Jan 30 21:52:41 UTC 2009


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv18148/lib/Locale/Po4a

Modified Files:
	Xml.pm 
Log Message:
	* lib/Locale/Po4a/Xml.pm: Simplify regexp.


Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- Xml.pm	30 Jan 2009 21:51:47 -0000	1.85
+++ Xml.pm	30 Jan 2009 21:52:39 -0000	1.86
@@ -1677,11 +1677,11 @@
 		push @text, ($line,$ref);
 		$paragraph .= $line;
 		if ($unquoted) {
-			if ( $paragraph =~ /^((\".*?\")|(\'.*?\')|[^\"\'])*$search.*/s ) {
+			if ( $paragraph =~ /^((\".*?\")|(\'.*?\')|[^\"\'])*$search/s ) {
 				$found = 1;
 			}
 		} else {
-			if ( $paragraph =~ /.*$search.*/s ) {
+			if ( $paragraph =~ /$search/s ) {
 				$found = 1;
 			}
 		}
@@ -1704,7 +1704,7 @@
 			$text[$#text-1] =~ s/\Q$line\E$//s;
 		}
 		if(!$include) {
-			$text[$#text-1] =~ /(.*)($search.*)/s;
+			$text[$#text-1] =~ /^(.*)($search.*)$/s;
 			$text[$#text-1] = $1;
 			$line = $2.$line;
 		}




More information about the Po4a-commits mailing list