[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7870] _text_to_lines for empty input
From: |
gavinsmith0123 |
Subject: |
[7870] _text_to_lines for empty input |
Date: |
Tue, 27 Jun 2017 19:08:20 -0400 (EDT) |
Revision: 7870
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7870
Author: gavin
Date: 2017-06-27 19:08:20 -0400 (Tue, 27 Jun 2017)
Log Message:
-----------
_text_to_lines for empty input
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Parser.pm
trunk/tp/t/results/sectioning/empty_top_node_up.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2017-06-27 19:32:40 UTC (rev 7869)
+++ trunk/ChangeLog 2017-06-27 23:08:20 UTC (rev 7870)
@@ -1,5 +1,13 @@
2017-06-27 Gavin Smith <address@hidden>
+ * tp/Texinfo/Parser.pm (_text_to_lines): Do not return an array
+ containing a single empty string if the input is an empty
+ string; instead, return a completely empty array. This means
+ that parse_texi_line does not get as far into parsing for an
+ empty input.
+
+2017-06-27 Gavin Smith <address@hidden>
+
* tp/Texinfo/Parser.pm <root commands>: Do not associate a @part
command with a following sectioning command if another @part
command appears first. This means there is no special support
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2017-06-27 19:32:40 UTC (rev 7869)
+++ trunk/tp/Texinfo/Parser.pm 2017-06-27 23:08:20 UTC (rev 7870)
@@ -786,8 +786,7 @@
die if (!defined($text));
my $had_final_end_line = chomp($text);
my $lines = [ map {$_."\n"} split (/\n/, $text, -1) ];
- $lines = [''] if (address@hidden);
- chomp($lines->[-1]) unless ($had_final_end_line);
+ chomp($lines->[-1]) unless (address@hidden or $had_final_end_line);
return $lines;
}
Modified: trunk/tp/t/results/sectioning/empty_top_node_up.pl
===================================================================
--- trunk/tp/t/results/sectioning/empty_top_node_up.pl 2017-06-27 19:32:40 UTC
(rev 7869)
+++ trunk/tp/t/results/sectioning/empty_top_node_up.pl 2017-06-27 23:08:20 UTC
(rev 7870)
@@ -418,7 +418,6 @@
'node_next' => {},
'node_up' => {
'extra' => {
- 'normalized' => '',
'top_node_up' => {}
},
'type' => 'top_node_up'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7870] _text_to_lines for empty input,
gavinsmith0123 <=