[Po4a-commits] "po4a/lib/Locale/Po4a Text.pm,1.9,1.10"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Tue Oct 10 18:49:38 UTC 2006


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

Modified Files:
	Text.pm 
Log Message:
When we try to detect if a paragraph contains multiple bullets, quote the
bullet to avoid problems with parenthesis.


Index: Text.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Text.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Text.pm	9 Oct 2006 21:01:53 -0000	1.9
+++ Text.pm	10 Oct 2006 18:49:36 -0000	1.10
@@ -147,10 +147,7 @@
             }
             # TODO: detect if a line starts with the same bullet
             if ($text !~ m/\S[ \t][ \t][ \t]+\S/s) {
-                my $bullet_regex = $indent1.$bullet;
-                $bullet_regex =~ s/\*/\\\*/;
-                $bullet_regex =~ s/\+/\\\+/;
-                $bullet_regex =~ s/\./\\\./;
+                my $bullet_regex = quotemeta($indent1.$bullet);
                 $bullet_regex =~ s/[0-9]+/\\d\+/;
                 if ($para eq '' or $para =~ m/^$bullet_regex\S/s) {
                     my $trans = $self->translate($text,




More information about the Po4a-commits mailing list