[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.144,1.145"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sat Jun 3 22:03:16 UTC 2006


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

Modified Files:
	Man.pm 
Log Message:
Add \c'...' and \[...] to the list of exceptions for the - to \- convertion.
Also count the number of '\' (make sure there is an odd number of \)


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- Man.pm	3 Jun 2006 19:30:30 -0000	1.144
+++ Man.pm	3 Jun 2006 22:03:13 -0000	1.145
@@ -866,13 +866,16 @@
             my $begin = $1;
             $str = $2;
             my $tmp2 = $tmp.$begin;
-            if (   ($begin =~ m/\\s$/s)
-                or ($begin =~ m/\\\((.|E<[gl]t>)$/s)
-                or ($tmp2 =~ m/\\h'([^']|\\')*$/)) {
+            if (   ($begin =~ m/(?<!\\)(\\\\)*\\s$/s)
+                or ($begin =~ m/(?<!\\)(\\\\)*\\\((.|E<[gl]t>)$/s)
+                or ($tmp2 =~ m/(?<!\\)(\\\\)*\\[hC]'([^']|(?<!\\)(\\\\)*\\')*$/)
+                or ($tmp2 =~ m/(?<!\\)(\\\\)*\\\[([^\]]|(?<!\\)(\\\\)*\\\[)*$/)) {
                 # Do not change - to \- for
                 #  * \s-n (reduce font size)
                 #  * \(.- (a character named '.-', e.g. '<-')
                 #  * inside a \h'...'
+                #  * inside a \C'...'
+                #  * inside a \[...]
                 $tmp = $tmp2."-";
             } else {
                 $tmp = $tmp2."\\-";




More information about the Po4a-commits mailing list