[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Convert/Line.pm Texinfo...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Convert/Line.pm Texinfo... |
Date: |
Sun, 21 Nov 2010 13:30:11 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 10/11/21 13:30:11
Modified files:
tp : TODO
tp/Texinfo/Convert: Line.pm Plaintext.pm
tp/t : paragraph.t
tp/t/results/coverage: block_commands.pl
Log message:
Count prepended quotation length text to determine if indentation is
to be done.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.55&r2=1.56
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Line.pm?cvsroot=texinfo&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/paragraph.t?cvsroot=texinfo&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/block_commands.pl?cvsroot=texinfo&r1=1.26&r2=1.27
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- TODO 21 Nov 2010 11:57:15 -0000 1.55
+++ TODO 21 Nov 2010 13:30:06 -0000 1.56
@@ -15,6 +15,8 @@
test empty line in block or brace command in menu description.
+test @w.
+
in hyphenation: only text and accent commands, and should
only appear in toplevel
Index: Texinfo/Convert/Line.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Line.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- Texinfo/Convert/Line.pm 21 Nov 2010 11:57:15 -0000 1.5
+++ Texinfo/Convert/Line.pm 21 Nov 2010 13:30:11 -0000 1.6
@@ -88,6 +88,7 @@
$result .= $line->{'space'};
print STDERR "ADD_SPACES\n" if ($line->{'debug'});
}
+ $line->{'space'} = '';
$result .= $line->{'word'};
print STDERR "ADD_WORD[$line->{'word'}]\n" if ($line->{'debug'});
$line->{'word'} = undef;
@@ -95,11 +96,12 @@
return $result;
}
-# end a paragraph
+# end a line
sub end($)
{
my $line = shift;
my $result = $line->add_pending_word();
+ $result .= $line->{'space'};
$line->{'line_beginning'} = 1;
$line->{'space'} = '';
print STDERR "END_LINE\n" if ($line->{'debug'});
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- Texinfo/Convert/Plaintext.pm 21 Nov 2010 11:57:15 -0000 1.10
+++ Texinfo/Convert/Plaintext.pm 21 Nov 2010 13:30:11 -0000 1.11
@@ -302,6 +302,8 @@
'frenchspacing' => $self->{'frenchspacing'},
'indent_level' => $self->{'format_context'}->[-1]->{'indent_level'},
};
+ $container_conf->{'counter'} = $self->{'format_context'}->[-1]->{'counter'}
+ if (defined($self->{'format_context'}->[-1]->{'counter'}));
if ($conf) {
foreach my $key (keys(%$conf)) {
$container_conf->{$key} = $conf->{$key};
@@ -612,6 +614,8 @@
{'contents' =>
$root->{'extra'}->{'block_command_line_contents'}->[0]});
my $prepended = Texinfo::Parser::parse_texi_line (undef,
'@b{'.${quotation_arg}.':} ');
$result = $self->convert_line ($prepended);
+ $self->{'format_context'}->[-1]->{'counter'} +=
+ Texinfo::Convert::Unicode::string_width($result);
#return gdt('@b{{quotation_arg}:} ', {'quotation_arg' => $text},
{'keep_texi' => 1});
#$result = convert($root->{'args'}->[0]) ."\n";
@@ -775,6 +779,7 @@
$result .= "\n" if (!$self->{'empty_lines_count'}
or $self->{'context'}->[-1] eq 'preformatted');
$self->{'empty_lines_count'}++;
+ delete $self->{'format_context'}->[-1]->{'counter'};
} else {
$result .= $self->convert($content);
}
Index: t/paragraph.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/paragraph.t,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- t/paragraph.t 21 Nov 2010 11:57:15 -0000 1.9
+++ t/paragraph.t 21 Nov 2010 13:30:11 -0000 1.10
@@ -348,7 +348,7 @@
test_line(["word\n"], "word\n", 'word');
test_line(['word other'], "word other", 'two_words');
-test_line(['word '], "word", 'trailing spaces');
+test_line(['word '], 'word ', 'trailing spaces');
test_line(["word \n"], "word\n", 'trailing spaces eol');
test_line([' word'], "word", 'leading spaces');
test_line([' ', ' word'], "word", 'double leading spaces');
Index: t/results/coverage/block_commands.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/block_commands.pl,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
- texinfo/tp TODO Texinfo/Convert/Line.pm Texinfo...,
Patrice Dumas <=