[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.109,1.110"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Sat Sep 3 16:58:45 UTC 2005
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv4592/lib/Locale/Po4a
Modified Files:
Man.pm
Log Message:
We used to change the lines starting by a dot or apostroph, by appending a
null space (\&).
This is not always welcome (see the .ta arguments). Do only this in
regular text, and for some type (e.g. TP - i.e. the line following a .TP)
Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- Man.pm 3 Sep 2005 16:42:04 -0000 1.109
+++ Man.pm 3 Sep 2005 16:58:43 -0000 1.110
@@ -816,15 +816,22 @@
# No . or ' on first char, or nroff will think it's a macro
# * at the beginning of a paragraph, add \& (zero width space) at
# the beginning of the line
- unless (defined $self->{type} && $self->{type} =~ m/^(TS)$/) {
- # This doesn't work after a TS (this macros shift
+ if (not defined $self->{type}) {
+ # Only do it on regular text, because
+ # his doesn't work after a TS (this macros shift
# lines, which may contain macros)
+ # or for the .ta arguments (e.g. .ta .5i 3i)
$str =~ s/^((?:
(?:CW|[RBI])<
|$FONT_RE
)?
[.']
)/\\&$1/mgx;
+ } elsif ($self->{type} =~ m/^(TP)$/) {
+ # But it is also needed for some type (e.g. TP, if followed by a
+ # font macro)
+ # This regular expression is the same as above
+ $str =~ s/^((?:(?:CW|[RBI])<|$FONT_RE)?[.'])/\\&$1/mg;
}
# * degraded mode, doesn't work for the first line of a paragraph
$str =~ s/\n([.'])/ $1/mg;
More information about the Po4a-commits
mailing list