[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6443] . at end of line inside @w
From: |
Gavin D. Smith |
Subject: |
[6443] . at end of line inside @w |
Date: |
Tue, 21 Jul 2015 16:15:21 +0000 |
Revision: 6443
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6443
Author: gavin
Date: 2015-07-21 16:15:20 +0000 (Tue, 21 Jul 2015)
Log Message:
-----------
. at end of line inside @w
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/Paragraph.pm
trunk/tp/t/paragraph.t
trunk/tp/t/results/coverage_braces/test_w.pl
trunk/tp/t/results/misc_commands/test_allowcodebreaks.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-07-21 15:43:43 UTC (rev 6442)
+++ trunk/ChangeLog 2015-07-21 16:15:20 UTC (rev 6443)
@@ -1,5 +1,10 @@
2015-07-21 Gavin Smith <address@hidden>
+ * tp/Texinfo/Convert/Paragraph.pm (add_text): Don't double space
+ after a full stop at the end of a line inside a @w{ ... }.
+
+2015-07-21 Gavin Smith <address@hidden>
+
* contrib/nontests: New directory. Move most of the files from
util/tests into it. Suggestion from Karl Berry on 7th July.
* contrib/tests/README: Say that tests were for util directory.
Modified: trunk/tp/Texinfo/Convert/Paragraph.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Paragraph.pm 2015-07-21 15:43:43 UTC (rev
6442)
+++ trunk/tp/Texinfo/Convert/Paragraph.pm 2015-07-21 16:15:20 UTC (rev
6443)
@@ -353,24 +353,12 @@
# \x{202f}\x{00a0} are non breaking spaces
if (defined $spaces) {
print STDERR "SPACES($paragraph->{'counter'})
`"._print_escaped_spaces($spaces)."'\n" if $debug_flag;
- #my $added_word = $paragraph->{'word'};
if ($protect_spaces_flag) {
$paragraph->{'word'} .= $spaces;
$paragraph->{'last_char'} = substr($spaces, -1);
$paragraph->{'word_counter'} += length($spaces);
- #$paragraph->{'space'} .= $spaces;
- if ($paragraph->{'word'} =~ s/\n/ /g
- and !$paragraph->{'frenchspacing'}
- and $paragraph->{'end_sentence'}
- and $paragraph->{'end_sentence'} > 0) {
- $paragraph->{'word'} =~ /(\s*)$/;
- if (length($1) < 2) {
- my $added = ' ' x (2 - length($1));
- $paragraph->{'word'} .= $added;
- $paragraph->{'last_char'} = ' ';
- $paragraph->{'word_counter'} += length($added);
- }
- }
+ $paragraph->{'word'} =~ s/\n/ /g;
+
# The $paragraph->{'counter'} != 0 is here to avoid having an
# additional line output when the text is longer than the max.
if ($paragraph->{'counter'} != 0 and
Modified: trunk/tp/t/paragraph.t
===================================================================
--- trunk/tp/t/paragraph.t 2015-07-21 15:43:43 UTC (rev 6442)
+++ trunk/tp/t/paragraph.t 2015-07-21 16:15:20 UTC (rev 6443)
@@ -370,7 +370,7 @@
$result .= $para->add_text(' ');
$result .= $para->set_space_protection(0,0);
$result .= $para->add_text("c ");
-is ($result, "aa.) bb eee .)_ aa . gg. a c\n", "protected spaces
many inputs");
+is ($result, "aa.) bb eee .)_ aa . gg. a c\n", "protected spaces
many inputs");
$para->end();
$para = Texinfo::Convert::Paragraph->new({'max' => 10});
@@ -403,7 +403,7 @@
$result .= $para->set_space_protection(0,0);
$result .= $para->add_text ("gg.\n");
$result .= $para->end();
-is ($result, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbb
bbbbb bbb b b b b b b b b b bb . ccc ddddgg.\n", 'long text followed by text
protected');
+is ($result, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbb
bbbbb bbb b b b b b b b b b bb . ccc ddddgg.\n", 'long text followed by text
protected');
$para = Texinfo::Convert::Paragraph->new();
$result = '';
Modified: trunk/tp/t/results/coverage_braces/test_w.pl
===================================================================
--- trunk/tp/t/results/coverage_braces/test_w.pl 2015-07-21 15:43:43 UTC
(rev 6442)
+++ trunk/tp/t/results/coverage_braces/test_w.pl 2015-07-21 16:15:20 UTC
(rev 6443)
@@ -913,7 +913,7 @@
-$result_converted{'plaintext'}->{'test_w'} =
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbb bbbbb bbb b b
b b b b b b b bb . ccc dddd.
+$result_converted{'plaintext'}->{'test_w'} =
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbb bbbbb bbb b b
b b b b b b b bb . ccc dddd.
a a a a a a a a a a a a a a a a a a a a a a a a a a a a
b a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
Modified: trunk/tp/t/results/misc_commands/test_allowcodebreaks.pl
===================================================================
--- trunk/tp/t/results/misc_commands/test_allowcodebreaks.pl 2015-07-21
15:43:43 UTC (rev 6442)
+++ trunk/tp/t/results/misc_commands/test_allowcodebreaks.pl 2015-07-21
16:15:20 UTC (rev 6443)
@@ -2779,7 +2779,7 @@
in-example
In w:
-Out of code -- out-of-code. \'1aaa\' \'2aaa-\' \'-3bbb\' \'4aaa-bbb\' \'
5aaa-bb\' \'6aaa-bb \' \'ccc 7aaa-bbb\' \'ccc 8aaa-bbb ddd\' \'9aaa-bbb
rrr_vv\' \'fff-- --- minus-b aa-tte\'ff_gg aar-oman anc-hor
+Out of code -- out-of-code. \'1aaa\' \'2aaa-\' \'-3bbb\' \'4aaa-bbb\' \'
5aaa-bb\' \'6aaa-bb \' \'ccc 7aaa-bbb\' \'ccc 8aaa-bbb ddd\' \'9aaa-bbb
rrr_vv\' \'fff-- --- minus-b aa-tte\'ff_gg aar-oman anc-hor
\'
in-example
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6443] . at end of line inside @w,
Gavin D. Smith <=