[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo/Convert HTML.pm Plaintext.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo/Convert HTML.pm Plaintext.pm |
Date: |
Sun, 01 May 2011 19:10:05 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/05/01 19:10:05
Modified files:
tp/Texinfo/Convert: HTML.pm Plaintext.pm
Log message:
prepend space from last menu_entry_separator to description, as is done
in texi2html.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.137&r2=1.138
Patches:
Index: HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- HTML.pm 1 May 2011 15:15:47 -0000 1.46
+++ HTML.pm 1 May 2011 19:10:03 -0000 1.47
@@ -1898,10 +1898,25 @@
$description = '' if (_simplify_text_for_comparison($name_no_number)
eq _simplify_text_for_comparison($description));
}
+ if ($description ne '') {
+ # FIXME remove that. This is a compatibility with texi2html, space
+ # from preceding menu_entry_separator is used for description, but
+ # it is not really useful since space is not taken into account anyway
+ # in formatting
+ my $previous_arg;
+ foreach my $arg (@{$command->{'args'}}) {
+ if ($arg->{'type'} and $arg->{'type'} eq 'menu_entry_description') {
+ if ($previous_arg->{'type'} eq 'menu_entry_separator'
+ and $previous_arg->{'text'} =~ /(\s+)$/) {
+ $description = $1 . $description;
}
- # FIXME the space before description should be taken from the
- # preceding menu_entry_separator?
- return "<tr><td align=\"left\"
valign=\"top\">$name$MENU_ENTRY_COLON</td><td> </td><td
align=\"left\" valign=\"top\"> $description</td></tr>\n";
+ last;
+ }
+ $previous_arg = $arg;
+ }
+ }
+ }
+ return "<tr><td align=\"left\"
valign=\"top\">$name$MENU_ENTRY_COLON</td><td> </td><td
align=\"left\" valign=\"top\">$description</td></tr>\n";
}
$default_types_conversion{'menu_entry'} = \&_convert_menu_entry_type;
Index: Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -b -r1.137 -r1.138
--- Plaintext.pm 1 May 2011 17:12:45 -0000 1.137
+++ Plaintext.pm 1 May 2011 19:10:04 -0000 1.138
@@ -2285,7 +2285,7 @@
$result .= $line;
$self->{'empty_lines_count'} = 0;
$max_lines++;
- #Â there may be empty lines, in that case $line is undef, $max_lines == 0
+ # there may be empty lines, in that case $line is undef, $max_lines == 0
} elsif ($max_lines) {
if ($line eq "\n") {
$self->{'empty_lines_count'} = 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp/Texinfo/Convert HTML.pm Plaintext.pm,
Patrice Dumas <=