[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[8210] do not use _trim_spaces_comment_from_content
From: |
gavinsmith0123 |
Subject: |
[8210] do not use _trim_spaces_comment_from_content |
Date: |
Sat, 22 Sep 2018 18:53:37 -0400 (EDT) |
Revision: 8210
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8210
Author: gavin
Date: 2018-09-22 18:53:36 -0400 (Sat, 22 Sep 2018)
Log Message:
-----------
do not use _trim_spaces_comment_from_content
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Parser.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2018-09-22 21:22:41 UTC (rev 8209)
+++ trunk/ChangeLog 2018-09-22 22:53:36 UTC (rev 8210)
@@ -1,5 +1,13 @@
2018-09-22 Gavin Smith <address@hidden>
+ * tp/Texinfo/Parser.pm (_end_line): Reparent an empty argument
+ of a block command to the contents before possibly processing a
+ float command, instead of after.
+ (_parse_float_type): Allow args to be undefined. Do not use
+ _trim_spaces_comment_from_content.
+
+2018-09-22 Gavin Smith <address@hidden>
+
* tp/Texinfo/Parser.pm (_parse_line_command_args): Do not call
_trim_spaces_comment_from_content.
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2018-09-22 21:22:41 UTC (rev 8209)
+++ trunk/tp/Texinfo/Parser.pm 2018-09-22 22:53:36 UTC (rev 8210)
@@ -2228,13 +2228,13 @@
sub _parse_float_type($)
{
my $current = shift;
- if (@{$current->{'args'}}) {
- my @type_contents = @{$current->{'args'}->[0]->{'contents'}};
- _trim_spaces_comment_from_content(address@hidden);
- if (@type_contents) {
+ if ($current->{'args'} and @{$current->{'args'}}) {
+ if (@{$current->{'args'}->[0]->{'contents'}}) {
my $normalized
- = Texinfo::Convert::Texinfo::convert({'contents' => address@hidden);
- $current->{'extra'}->{'type'}->{'content'} = address@hidden;
+ = Texinfo::Convert::Texinfo::convert(
+ {'contents' => $current->{'args'}->[0]->{'contents'}});
+ $current->{'extra'}->{'type'}->{'content'} =
+ $current->{'args'}->[0]->{'contents'};
$current->{'extra'}->{'type'}->{'normalized'} = $normalized;
return 1;
}
@@ -2840,26 +2840,6 @@
} else {
_isolate_last_space($self, $current);
}
- # @float args
- if ($current->{'parent'}->{'cmdname'}
- and $current->{'parent'}->{'cmdname'} eq 'float') {
- my $float = $current->{'parent'};
- $float->{'line_nr'} = $line_nr;
- my $type = '';
- if (@{$float->{'args'}}) {
- my $float_label;
- if ($float->{'args'}->[1]) {
- $float_label = _parse_node_manual($float->{'args'}->[1]);
- _check_internal_node($self, $float_label, $line_nr);
- }
- _register_label($self, $float, $float_label);
- _parse_float_type($float);
- $type = $float->{'extra'}->{'type'}->{'normalized'};
- }
- push @{$self->{'floats'}->{$type}}, $float;
- $float->{'extra'}->{'float_section'} = $self->{'current_section'}
- if (defined($self->{'current_section'}));
- }
$current = $current->{'parent'};
delete $current->{'remaining_args'};
# don't consider empty argument of block @-commands as argument,
@@ -2874,6 +2854,23 @@
delete $current->{'args'};
}
+ # @float args
+ if ($current->{'cmdname'} and $current->{'cmdname'} eq 'float') {
+ $current->{'line_nr'} = $line_nr;
+ my $type = '';
+ my $float_label;
+ if ($current->{'args'} and $current->{'args'}->[1]) {
+ $float_label = _parse_node_manual($current->{'args'}->[1]);
+ _check_internal_node($self, $float_label, $line_nr);
+ }
+ _register_label($self, $current, $float_label);
+ _parse_float_type($current);
+ $type = $current->{'extra'}->{'type'}->{'normalized'};
+ push @{$self->{'floats'}->{$type}}, $current;
+ $current->{'extra'}->{'float_section'} = $self->{'current_section'}
+ if (defined($self->{'current_section'}));
+ }
+
if ($current->{'cmdname'}
and $block_item_commands{$current->{'cmdname'}}) {
if ($current->{'cmdname'} eq 'enumerate') {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [8210] do not use _trim_spaces_comment_from_content,
gavinsmith0123 <=