[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/ParserNonXS.pm (_process_remaining_o
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line): minor change, remove a useless variable, code more similar to XS parser. |
Date: |
Sun, 05 Mar 2023 03:15:29 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 85ad7e1593 * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line):
minor change, remove a useless variable, code more similar to XS parser.
85ad7e1593 is described below
commit 85ad7e15932501574af1943ddf68647cf596f153
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Mar 5 09:15:19 2023 +0100
* tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line): minor
change, remove a useless variable, code more similar to XS parser.
---
ChangeLog | 5 +++++
tp/Texinfo/ParserNonXS.pm | 26 ++++++++++++--------------
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ba28d4d172..309b54bf54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-03-05 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line): minor
+ change, remove a useless variable, code more similar to XS parser.
+
2023-03-04 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/parsetexi/parser.h (GLOBAL_INFO),
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 367d2f723a..e04818283f 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -6748,12 +6748,11 @@ sub _process_remaining_on_line($$$$)
$current = $new_arg;
# internal_spaces_before_argument is a transient internal type,
# which should end up in info spaces_before_argument.
- push @{$current->{'contents'}},
- {'type' => 'internal_spaces_before_argument',
- 'text' => '',
- 'parent' => $current,
- 'extra' => {'spaces_associated_command' => $current}
- };
+ my $space_before = {'type' => 'internal_spaces_before_argument',
+ 'text' => '', 'parent' => $current,
+ 'extra' => {'spaces_associated_command' => $current}
+ };
+ push @{$current->{'contents'}}, $space_before_arg;
} elsif ($separator eq ',' and $current->{'type'}
and $current->{'type'} eq 'line_arg'
and $current->{'parent'}->{'cmdname'}
@@ -6763,12 +6762,12 @@ sub _process_remaining_on_line($$$$)
and $current->{'type'} eq 'paragraph') {
# A form feed stops and restart a paragraph.
$current = _end_paragraph($self, $current, $source_info);
- push @{$current->{'contents'}}, {'text' => $separator,
- 'type' => 'empty_line',
- 'parent' => $current };
- push @{$current->{'contents'}}, { 'type' => 'empty_line',
- 'text' => '',
- 'parent' => $current };
+ my $line_feed = {'type' => 'empty_line', 'text' => $separator,
+ 'parent' => $current };
+ push @{$current->{'contents'}}, $line_feed;
+ my $empty_line = { 'type' => 'empty_line', 'text' => '',
+ 'parent' => $current };
+ push @{$current->{'contents'}}, $empty_line;
} else {
$current = _merge_text($self, $current, $separator);
}
@@ -6779,9 +6778,8 @@ sub _process_remaining_on_line($$$$)
# Misc text except end of line
} elsif (defined $misc_text) {
print STDERR "MISC TEXT: $misc_text\n" if ($self->{'DEBUG'});
- my $new_text = $misc_text;
substr ($line, 0, length ($misc_text)) = '';
- $current = _merge_text($self, $current, $new_text);
+ $current = _merge_text($self, $current, $misc_text);
# end of line
} else {
print STDERR "END LINE: "
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line): minor change, remove a useless variable, code more similar to XS parser.,
Patrice Dumas <=