[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7876] set level in Texinfo::Structuring::sectioning_structure
From: |
gavinsmith0123 |
Subject: |
[7876] set level in Texinfo::Structuring::sectioning_structure |
Date: |
Thu, 29 Jun 2017 10:13:31 -0400 (EDT) |
Revision: 7876
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7876
Author: gavin
Date: 2017-06-29 10:13:30 -0400 (Thu, 29 Jun 2017)
Log Message:
-----------
set level in Texinfo::Structuring::sectioning_structure
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Convert/HTML.pm
trunk/tp/Texinfo/Convert/Text.pm
trunk/tp/Texinfo/Parser.pm
trunk/tp/Texinfo/Structuring.pm
trunk/tp/texi2any.pl
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2017-06-28 22:09:55 UTC (rev 7875)
+++ trunk/ChangeLog 2017-06-29 14:13:30 UTC (rev 7876)
@@ -1,3 +1,14 @@
+2017-06-29 Gavin Smith <address@hidden>
+
+ * tp/Texinfo/Parser.pm (_parse_texi): Do not add 'level' value
+ on sectioning commands.
+ * tp/Texinfo/Structuring.pm (sectioning_structure): Add 'level'
+ value on element.
+ * tp/Texinfo/Convert/HTML.pm (_convert_heading_command),
+ * tp/Texinfo/Convert/Text.pm (heading):
+ Account for the case when 'level' is not set.
+ * texi2any.pl: Remove a comment.
+
2017-06-28 Gavin Smith <address@hidden>
* tp/Texinfo/Parser.pm (_end_line) <@copying>: Removing handling
Modified: trunk/tp/Texinfo/Convert/HTML.pm
===================================================================
--- trunk/tp/Texinfo/Convert/HTML.pm 2017-06-28 22:09:55 UTC (rev 7875)
+++ trunk/tp/Texinfo/Convert/HTML.pm 2017-06-29 14:13:30 UTC (rev 7876)
@@ -2367,8 +2367,10 @@
$heading_level = 3;
}
}
+ } elsif (defined $command->{'level'}) {
+ $heading_level = $command->{'level'};
} else {
- $heading_level = $command->{'level'};
+ $heading_level = Texinfo::Parser::_section_level($command);
}
my $heading = $self->command_text($command);
Modified: trunk/tp/Texinfo/Convert/Text.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Text.pm 2017-06-28 22:09:55 UTC (rev 7875)
+++ trunk/tp/Texinfo/Convert/Text.pm 2017-06-29 14:13:30 UTC (rev 7876)
@@ -310,6 +310,9 @@
} else {
$indent_length = 0;
}
+ if (!defined $current->{'level'}) {
+ $current->{'level'} = Texinfo::Parser::_section_level($current);
+ }
$result .=($underline_symbol{$current->{'level'}}
x (Texinfo::Convert::Unicode::string_width($text) - $indent_length))."\n";
return $result;
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2017-06-28 22:09:55 UTC (rev 7875)
+++ trunk/tp/Texinfo/Parser.pm 2017-06-29 14:13:30 UTC (rev 7876)
@@ -4451,7 +4451,6 @@
$current->{'contents'}->[-1]->{'extra'}->{'sections_level'}
= $self->{'sections_level'};
}
- $misc->{'level'} = _section_level($misc);
}
if ($root_commands{$command}) {
$misc->{'contents'} = [];
Modified: trunk/tp/Texinfo/Structuring.pm
===================================================================
--- trunk/tp/Texinfo/Structuring.pm 2017-06-28 22:09:55 UTC (rev 7875)
+++ trunk/tp/Texinfo/Structuring.pm 2017-06-29 14:13:30 UTC (rev 7876)
@@ -141,7 +141,8 @@
$section_top = $content;
}
}
- my $level = $content->{'level'};
+ my $level;
+ $level = $content->{'level'} = Texinfo::Parser::_section_level($content);
if (!defined($level)) {
warn "bug: level not defined for $content->{'cmdname'}\n";
$level = $content->{'level'} = 0;
Modified: trunk/tp/texi2any.pl
===================================================================
--- trunk/tp/texi2any.pl 2017-06-28 22:09:55 UTC (rev 7875)
+++ trunk/tp/texi2any.pl 2017-06-29 14:13:30 UTC (rev 7876)
@@ -1314,8 +1314,7 @@
Texinfo::Structuring::associate_internal_references($parser);
# every format needs the sectioning structure
- # FIXME this adjusts the level of sectioning commands. Maybe should be
- # done before dumping the tree?
+
my $structure = Texinfo::Structuring::sectioning_structure($parser, $tree);
if ($structure
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7876] set level in Texinfo::Structuring::sectioning_structure,
gavinsmith0123 <=