[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6368] add_text remove second argument
From: |
Gavin D. Smith |
Subject: |
[6368] add_text remove second argument |
Date: |
Tue, 30 Jun 2015 12:08:20 +0000 |
Revision: 6368
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6368
Author: gavin
Date: 2015-06-30 12:08:13 +0000 (Tue, 30 Jun 2015)
Log Message:
-----------
add_text remove second argument
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/Line.pm
trunk/tp/Texinfo/Convert/Paragraph.pm
trunk/tp/Texinfo/Convert/Plaintext.pm
trunk/tp/Texinfo/Convert/UnFilled.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-06-30 11:19:12 UTC (rev 6367)
+++ trunk/ChangeLog 2015-06-30 12:08:13 UTC (rev 6368)
@@ -1,6 +1,12 @@
2015-06-30 Gavin Smith <address@hidden>
* tp/Texinfo/Convert/Line.pm, tp/Texinfo/Convert/Paragraph.pm,
+ tp/Texinfo/Convert/UnFilled.pm (add_underlying_text): Remove.
+ (add_text): Remove second argument.
+
+2015-06-30 Gavin Smith <address@hidden>
+
+ * tp/Texinfo/Convert/Line.pm, tp/Texinfo/Convert/Paragraph.pm,
tp/Texinfo/Convert/UnFilled.pm: (allow_end_sentence): New function.
* tp/Texinfo/Convert/Line.pm, tp/Texinfo/Convert/Paragraph.pm,
Modified: trunk/tp/Texinfo/Convert/Line.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Line.pm 2015-06-30 11:19:12 UTC (rev 6367)
+++ trunk/tp/Texinfo/Convert/Line.pm 2015-06-30 12:08:13 UTC (rev 6368)
@@ -232,17 +232,6 @@
return $result;
}
-sub add_underlying_text($$)
-{
- my $line = shift;
- my $underlying_text = shift;
- if (defined($underlying_text)) {
- $line->{'underlying_word'} = ''
- if (!defined($line->{'underlying_word'}));
- $line->{'underlying_word'} .= $underlying_text;
- }
-}
-
sub inhibit_end_sentence($)
{
my $line = shift;
@@ -286,12 +275,11 @@
}
# wrap a text.
-sub add_text($$;$)
+sub add_text($$)
{
my $line = shift;
my $text = shift;
- my $underlying_text = shift;
- $underlying_text = $text if (!defined($underlying_text));
+ my $underlying_text = $text;
$line->{'end_line_count'} = 0;
my $result = '';
@@ -303,7 +291,6 @@
}
# \x{202f}\x{00a0} are non breaking spaces
if ($text =~ s/^([^\S\x{202f}\x{00a0}\n]+)//) {
- $underlying_text =~ s/^([^\S\x{202f}\x{00a0}\n]+)//;
my $spaces = $1;
print STDERR "SPACES.L\n" if ($line->{'DEBUG'});
if ($line->{'protect_spaces'}) {
@@ -375,19 +362,15 @@
delete $line->{'end_sentence'};
}
} elsif ($text =~ s/^\n//) {
- $underlying_text =~ s/^\n//;
$result .= $line->_end_line();
} elsif ($text =~ s/^(\p{InFullwidth})//) {
my $added = $1;
- $underlying_text =~ s/^(\p{InFullwidth})//;
- my $underlying_added = $1;
print STDERR "EAST_ASIAN.L\n" if ($line->{'DEBUG'});
if (!defined($line->{'word'})) {
$line->{'word'} = '';
- $line->{'underlying_word'} = '';
}
$line->{'word'} .= $added;
- $line->{'underlying_word'} .= $underlying_added;
+ $line->{'underlying_word'} = $added;
$result .= $line->_add_pending_word();
delete $line->{'end_sentence'};
$line->{'space'} = '';
Modified: trunk/tp/Texinfo/Convert/Paragraph.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Paragraph.pm 2015-06-30 11:19:12 UTC (rev
6367)
+++ trunk/tp/Texinfo/Convert/Paragraph.pm 2015-06-30 12:08:13 UTC (rev
6368)
@@ -273,17 +273,6 @@
return $result;
}
-sub add_underlying_text($$)
-{
- my $paragraph = shift;
- my $underlying_text = shift;
- if (defined($underlying_text)) {
- $paragraph->{'underlying_word'} = ''
- if (!defined($paragraph->{'underlying_word'}));
- $paragraph->{'underlying_word'} .= $underlying_text;
- }
-}
-
sub inhibit_end_sentence($)
{
my $paragraph = shift;
@@ -328,11 +317,10 @@
}
# wrap a text.
-sub add_text($$;$)
+sub add_text($$)
{
my $paragraph = shift;
my $text = shift;
- my $underlying_text = shift;
$paragraph->{'end_line_count'} = 0;
my $result = '';
@@ -466,21 +454,12 @@
if (defined($paragraph->{'end_sentence'}) and $paragraph->{'DEBUG'});
}
} elsif (defined $fullwidth_segment) {
- my $underlying_added;
- if (defined($underlying_text)) {
- $underlying_text =~ s/^(\p{InFullwidth})//;
- $underlying_added = $1;
- } else {
- $underlying_added = $fullwidth_segment;
- }
-
print STDERR "EAST_ASIAN\n" if ($paragraph->{'DEBUG'});
if (!defined($paragraph->{'word'})) {
$paragraph->{'word'} = '';
- $paragraph->{'underlying_word'} = '';
}
$paragraph->{'word'} .= $fullwidth_segment;
- $paragraph->{'underlying_word'} .= $underlying_added;
+ $paragraph->{'underlying_word'} = $fullwidth_segment;
$paragraph->{'word_counter'} += 2;
if ($paragraph->{'counter'} != 0 and
$paragraph->{'counter'} + $paragraph->{'word_counter'}
Modified: trunk/tp/Texinfo/Convert/Plaintext.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Plaintext.pm 2015-06-30 11:19:12 UTC (rev
6367)
+++ trunk/tp/Texinfo/Convert/Plaintext.pm 2015-06-30 12:08:13 UTC (rev
6368)
@@ -31,8 +31,8 @@
use Texinfo::Convert::Line;
use Texinfo::Convert::UnFilled;
-use XSParagraph;
-XSParagraph::hello ();
+#use XSParagraph;
+#XSParagraph::hello ();
# TODO: Run initialization code for XSParagraph implicitly.
use Carp qw(cluck);
@@ -2334,7 +2334,7 @@
$res = "U+$arg"; # not outputting UTF-8
}
$result .= _count_added($self, $formatter->{'container'},
- $formatter->{'container'}->add_text($res, $res));
+ $formatter->{'container'}->add_text($res));
} else {
$result = ''; # arg was not defined
}
Modified: trunk/tp/Texinfo/Convert/UnFilled.pm
===================================================================
--- trunk/tp/Texinfo/Convert/UnFilled.pm 2015-06-30 11:19:12 UTC (rev
6367)
+++ trunk/tp/Texinfo/Convert/UnFilled.pm 2015-06-30 12:08:13 UTC (rev
6368)
@@ -166,12 +166,6 @@
return $result;
}
-sub add_underlying_text($$)
-{
- my $line = shift;
- my $underlying_text = shift;
-}
-
sub inhibit_end_sentence($)
{
my $line = shift;
@@ -192,7 +186,6 @@
{
my $line = shift;
my $text = shift;
- my $underlying_text = shift;
$line->{'end_line_count'} = 0;
return $line->_add_text($text);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6368] add_text remove second argument,
Gavin D. Smith <=