[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6795] don't count DEL bytes in ParagraphNonXS.pm
From: |
Gavin D. Smith |
Subject: |
[6795] don't count DEL bytes in ParagraphNonXS.pm |
Date: |
Sat, 21 Nov 2015 20:09:40 +0000 |
Revision: 6795
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6795
Author: gavin
Date: 2015-11-21 20:09:39 +0000 (Sat, 21 Nov 2015)
Log Message:
-----------
don't count DEL bytes in ParagraphNonXS.pm
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/ParagraphNonXS.pm
trunk/tp/t/results/plaintext_tests/quote_node_names/res_plaintext/quote_node_names.txt
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-11-21 19:30:12 UTC (rev 6794)
+++ trunk/ChangeLog 2015-11-21 20:09:39 UTC (rev 6795)
@@ -1,5 +1,12 @@
2015-11-21 Gavin Smith <address@hidden>
+ * tp/Texinfo/Convert/ParagraphNonXS.pm (_add_next): Don't count
+ DEL bytes in width of word.
+ * tp/t/results/plaintext_tests/
+ quote_node_names/res_plaintext/quote_node_names.txt: Update.
+
+2015-11-21 Gavin Smith <address@hidden>
+
* tp/t/README: Mention run_all function.
* tp/t/test_utils.pl (test, run_all, output_texi_file): Comments
added.
Modified: trunk/tp/Texinfo/Convert/ParagraphNonXS.pm
===================================================================
--- trunk/tp/Texinfo/Convert/ParagraphNonXS.pm 2015-11-21 19:30:12 UTC (rev
6794)
+++ trunk/tp/Texinfo/Convert/ParagraphNonXS.pm 2015-11-21 20:09:39 UTC (rev
6795)
@@ -180,7 +180,7 @@
return _add_next($paragraph, $word, $transparent);
}
-# add a word and/or end of sentence.
+# add a word
sub _add_next($;$$$)
{
my $paragraph = shift;
@@ -202,7 +202,7 @@
and $paragraph->{'end_sentence'} > 0
and !$paragraph->{'frenchspacing'}
and $paragraph->{'counter'} != 0 and $paragraph->{'space'}) {
- # do not to double space if there are leading spaces in word
+ # do not double space if there are leading spaces in word
if ($word !~ /^\s/) {
#$paragraph->{'space'} = ' ';
$paragraph->{'space'} .= ' ' x (2 - length($paragraph->{'space'}));
@@ -233,7 +233,13 @@
$paragraph->{'word'} = undef;
$paragraph->{'last_char'} = undef;
} else {
- $paragraph->{'word_counter'} += length($word);
+ my $word2;
+ $word2 = $word;
+ $word2 =~ s/[\177]//g;
+ $paragraph->{'word_counter'} += length($word2);
+ # We don't count DEL bytes here for INFO_SPECIAL_CHARS_QUOTE. We
+ # shouldn't count combining characters for accents either: see the
+ # t/converters_tests.t (at_commands_in_refs_utf8) test.
}
if ($paragraph->{'DEBUG'}) {
my $para_word = 'UNDEF';;
Modified:
trunk/tp/t/results/plaintext_tests/quote_node_names/res_plaintext/quote_node_names.txt
===================================================================
---
trunk/tp/t/results/plaintext_tests/quote_node_names/res_plaintext/quote_node_names.txt
2015-11-21 19:30:12 UTC (rev 6794)
+++
trunk/tp/t/results/plaintext_tests/quote_node_names/res_plaintext/quote_node_names.txt
2015-11-21 20:09:39 UTC (rev 6795)
@@ -1,5 +1,5 @@
-*Note the::caption and a word: normal node. *Note the::caption:
-normal node.
+*Note the::caption and a word: normal node. *Note the::caption: normal
+node.
*Note the::caption and a word: blah:blah. *Note the::caption:
blah:blah.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6795] don't count DEL bytes in ParagraphNonXS.pm,
Gavin D. Smith <=