[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.124,1.125"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Mon Mar 6 21:58:07 UTC 2006


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv20818/lib/Locale/Po4a

Modified Files:
	Man.pm 
Log Message:
Remove unneeded groups in regex. There should be a theoretical speed-up.
(This should be generalized).


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- Man.pm	6 Mar 2006 21:52:30 -0000	1.124
+++ Man.pm	6 Mar 2006 21:58:05 -0000	1.125
@@ -1091,12 +1091,12 @@
 		    "Unknown macro '%s'. Remove it from the document, or provide a patch to the po4a team."), $line);
 	    }
 
-	} elsif ($line =~ /^( +)([^. ].*)/) {
+	} elsif ($line =~ /^ +[^. ]/) {
 	    # (Lines containing only spaces are handled as empty lines)
 	    # Not a macro, but not a wrapped paragraph either
 	    $wrapped_mode = $wrapped_mode eq 'YES' ? 'NO' : $wrapped_mode;
 	    $paragraph .= $line."\n";
-	} elsif ($line =~ /^([^.].*)/ && $line !~ /^ *$/) {
+	} elsif ($line =~ /^[^.].*/ && $line !~ /^ *$/) {
 	    # (Lines containing only spaces are handled latter as empty lines)
 	    if ($line =~ /^\\"/) {
 		# special case: the line is entirely a comment, keep the




More information about the Po4a-commits mailing list