[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Pass source element command information to direct
From: |
Patrice Dumas |
Subject: |
branch master updated: Pass source element command information to directions formatting |
Date: |
Wed, 24 Aug 2022 04:45:23 -0400 |
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 c9454c1ab5 Pass source element command information to directions
formatting
c9454c1ab5 is described below
commit c9454c1ab54d6c018a625e08dad483ebf6b5dc99
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Aug 24 10:45:07 2022 +0200
Pass source element command information to directions formatting
* tp/Texinfo/Convert/HTML.pm (from_element_direction)
(_default_panel_button_dynamic_direction*, _default_format_button)
(_convert_tree_unit_type, _default_format_element_footer, _get_links):
pass the command associated with the element source of the
direction, to be able to format error messages with a line in the
document, for now for CHECK_HTMLXREF.
(_external_node_href): warn only once for htmlxref.cnf missing
even if the line is known.
---
ChangeLog | 14 ++
doc/customization_api.texi | 15 +-
tp/Texinfo/Convert/HTML.pm | 123 +++++++---
tp/t/html_tests.t | 42 ++--
tp/t/results/html_tests/check_htmlxref.pl | 260 ++++++++++++++++++++-
tp/t/results/html_tests/itemize_arguments.pl | 1 +
.../itemize_arguments_enable_encoding.pl | 1 +
7 files changed, 396 insertions(+), 60 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6775d19fe2..67374e03ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2022-08-24 Patrice Dumas <pertusus@free.fr>
+
+ Pass source element command information to directions formatting
+
+ * tp/Texinfo/Convert/HTML.pm (from_element_direction)
+ (_default_panel_button_dynamic_direction*, _default_format_button)
+ (_convert_tree_unit_type, _default_format_element_footer, _get_links):
+ pass the command associated with the element source of the
+ direction, to be able to format error messages with a line in the
+ document, for now for CHECK_HTMLXREF.
+
+ (_external_node_href): warn only once for htmlxref.cnf missing
+ even if the line is known.
+
2022-08-23 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.texi: Grammar and style fixes.
diff --git a/doc/customization_api.texi b/doc/customization_api.texi
index 96ad65ba48..d887fa292c 100644
--- a/doc/customization_api.texi
+++ b/doc/customization_api.texi
@@ -3016,7 +3016,7 @@ To get link information for relative and global
directions, use @code{from_element_direction}:
@deftypefun {@var{$result} =} @var{$converter}->from_element_direction
(@var{$direction}, @var{$type}, @
- @var{$source_element}, @var{$source_filename})
+ @var{$source_element}, @var{$source_filename}, @var{$source_command})
Return a string for linking to @var{$direction}, or the information
to be used for a hyperlink to @var{$direction}, depending on @var{$type}.
The possible values for @var{$type} are described in
@@ -3025,6 +3025,9 @@ The possible values for @var{$type} are described in
@var{$source_element} is the tree unit element the link comes from. If not set,
the current tree unit element is used. @var{$source_filename} is the file the
link comes from. If not set, the current file name is used.
+@var{$source_command}
+is an optional argument, the @@-command the link comes from. It is only used
for
+messages.
@end deftypefun
@@ -3329,8 +3332,10 @@ The function reference @code{format_button} does the
formatting of
one button:
@deftypefn {Function Reference} @var{$formatted_button} format_button @
- (@var{$converter}, @var{$button})
+ (@var{$converter}, @var{$button}, @var{$source_command})
@var{$button} holds the specification of the button (@pxref{Buttons Display}).
+@var{$source_command} is an optional argument, the @@-command the link comes
from.
+
Returns the formatted result in @var{$formatted_button}.
The buttons images can be formatted with @code{format_button_icon_img}
@@ -3377,10 +3382,12 @@ Similarly, the function associated with
@code{format_element_footer}
formats the footer and navigation panel of a tree unit element.
@deftypefn {Function Reference} @var{$formatted_footer} format_element_footer @
- (@var{$converter}, @var{$tree_unit_type}, @var{\%tree_unit_element},
@var{$content})
+ (@var{$converter}, @var{$tree_unit_type}, @var{\%tree_unit_element}, @
+ @var{$content}, @var{$command})
@var{\%tree_unit_element} is the tree unit element element in which the
navigation footer is formatted. @var{$tree_unit_type} is the associated type.
-@var{$content} is the formatted element content.
+@var{$content} is the formatted element content. @var{$command} is an optional
+argument, the @@-command associated with the @var{\%tree_unit_element}.
Returns the formatted navigation footer and panel.
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 0933444a4d..41cb7bbee1 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -809,7 +809,9 @@ sub command_href($$;$$$)
my $self = shift;
my $command = shift;
my $source_filename = shift;
+ # for messages only
my $source_command = shift;
+ # to specify explicitly the target
my $specified_target = shift;
$source_filename = $self->{'current_filename'} if
(!defined($source_filename));
@@ -1170,7 +1172,8 @@ foreach my $no_number_type ('text', 'tree', 'string') {
$valid_direction_return_type{$no_number_type .'_nonumber'} = 1;
}
-# sub from_element_direction($SELF, $DIRECTION, $TYPE, $SOURCE_ELEMENT,
$SOURCE_FILENAME)
+# sub from_element_direction($SELF, $DIRECTION, $TYPE, $SOURCE_ELEMENT,
+# $SOURCE_FILENAME, $SOURCE_FOR_MESSAGES)
#
# Return text used for linking from $SOURCE_ELEMENT in direction $DIRECTION.
The
# text returned depends on $TYPE.
@@ -1179,19 +1182,26 @@ foreach my $no_number_type ('text', 'tree', 'string') {
#
# If $SOURCE_ELEMENT is undef, $self->{'current_root_element'} is used.
#
+# $SOURCE_FOR_MESSAGES is an element used for messages formatting, to get a
+# location in input file. It is better to choose the node and not the
+# sectioning command associated with the element, as the error messages
+# are about external nodes not found.
+#
# $self->{'current_root_element'} undef happens at least when there is no
output file,
# or for the table of content when frames are used. That call would result
# for instance from from_element_direction being called from _get_links,
# itself called from 'format_begin_file' which, in the default case
# points to _default_format_begin_file.
# TODO are there other cases?
-sub from_element_direction($$$;$$)
+sub from_element_direction($$$;$$$)
{
my $self = shift;
my $direction = shift;
my $type = shift;
my $source_element = shift;
my $source_filename = shift;
+ # for messages only
+ my $source_command = shift;
my $target_element;
my $command;
@@ -1199,7 +1209,7 @@ sub from_element_direction($$$;$$)
$source_element = $self->{'current_root_element'} if
(!defined($source_element));
$source_filename = $self->{'current_filename'} if
(!defined($source_filename));
-
+
if (!$valid_direction_return_type{$type}) {
print STDERR "Incorrect type $type in from_element_direction call\n";
return undef;
@@ -1243,7 +1253,8 @@ sub from_element_direction($$$;$$)
#print STDERR "FROM_ELEMENT_DIRECTION ext node $type $direction\n"
# if ($self->get_conf('DEBUG'));
if ($type eq 'href') {
- return $self->command_href($external_node, $source_filename);
+ return $self->command_href($external_node, $source_filename,
+ $source_command);
} elsif ($type eq 'text' or $type eq 'node') {
return $self->command_text($external_node);
} elsif ($type eq 'string') {
@@ -3151,10 +3162,11 @@ sub _default_format_separate_anchor($$;$)
# Associated to a button. Return text to use for a link in button bar.
# Depending on USE_NODE_DIRECTIONS and xrefautomaticsectiontitle
# use section or node for link direction and string.
-sub _default_panel_button_dynamic_direction($$;$$)
+sub _default_panel_button_dynamic_direction($$;$$$)
{
my $self = shift;
my $direction = shift;
+ my $source_command = shift;
my $omit_rel = shift;
my $use_first_element_in_file_directions = shift;
@@ -3171,7 +3183,8 @@ sub _default_panel_button_dynamic_direction($$;$$)
$direction = 'FirstInFile'.$direction;
}
- my $href = $self->from_element_direction($direction, 'href');
+ my $href = $self->from_element_direction($direction, 'href',
+ undef, undef, $source_command);
my $node;
@@ -3199,22 +3212,26 @@ sub _default_panel_button_dynamic_direction($$;$$)
# Used for button bar at the foot of a node, with "rel" and "accesskey"
# attributes omitted.
-sub _default_panel_button_dynamic_direction_node_footer($$)
+sub _default_panel_button_dynamic_direction_node_footer($$$)
{
my $self = shift;
my $direction = shift;
+ my $source_command = shift;
- return _default_panel_button_dynamic_direction($self, $direction, 1);
+ return _default_panel_button_dynamic_direction($self, $direction,
+ $source_command, 1);
}
# used for button bar at the foot of a section or chapter with
# directions of first element in file used instead of the last
# element directions.
-sub _default_panel_button_dynamic_direction_section_footer($$) {
+sub _default_panel_button_dynamic_direction_section_footer($$$) {
my $self = shift;
my $direction = shift;
+ my $source_command = shift;
- return _default_panel_button_dynamic_direction($self, $direction, undef, 1);
+ return _default_panel_button_dynamic_direction($self, $direction,
+ $source_command, undef, 1);
}
# Only used if ICONS is set and the button is active.
@@ -3270,10 +3287,11 @@ foreach my $node_directions ('NodeNext', 'NodePrev',
'NodeUp') {
$html_default_node_directions{$node_directions} = 1;
}
-sub _default_format_button($$)
+sub _default_format_button($$;$)
{
my $self = shift;
my $button = shift;
+ my $source_command = shift;
my ($active, $passive, $need_delimiter);
if (ref($button) eq 'CODE') {
@@ -3288,7 +3306,8 @@ sub _default_format_button($$)
if (defined($direction) and ref($direction) eq ''
and defined($text) and (ref($text) eq 'SCALAR') and defined($$text)) {
# use given text
- my $href = $self->from_element_direction($direction, 'href');
+ my $href = $self->from_element_direction($direction, 'href',
+ undef, undef, $source_command);
if ($href) {
my $anchor_attributes = $self->_direction_href_attributes($direction);
$active = "<a href=\"$href\"${anchor_attributes}>$$text</a>";
@@ -3299,16 +3318,18 @@ sub _default_format_button($$)
# $direction is simple text and $text is a reference on code
} elsif (defined($direction) and ref($direction) eq ''
and defined($text) and (ref($text) eq 'CODE')) {
- ($active, $need_delimiter) = &$text($self, $direction);
+ ($active, $need_delimiter) = &$text($self, $direction, $source_command);
# $direction is simple text and $text is also a simple text
} elsif (defined($direction) and ref($direction) eq ''
and defined($text) and ref($text) eq '') {
if ($text =~ s/^->\s*//) {
# this case is mostly for tests, to test the direction type $text
# with the direction $direction
- $active = $self->from_element_direction($direction, $text);
+ $active = $self->from_element_direction($direction, $text,
+ undef, undef, $source_command);
} else {
- my $href = $self->from_element_direction($direction, 'href');
+ my $href = $self->from_element_direction($direction, 'href',
+ undef, undef,
$source_command);
my $text_formatted = $self->from_element_direction($direction, $text);
if ($href) {
my $anchor_attributes =
$self->_direction_href_attributes($direction);
@@ -3332,7 +3353,8 @@ sub _default_format_button($$)
}
$need_delimiter = 0;
} else {
- my $href = $self->from_element_direction($button, 'href');
+ my $href = $self->from_element_direction($button, 'href',
+ undef, undef, $source_command);
if ($href) {
# button is active
my $btitle = '';
@@ -3416,7 +3438,7 @@ sub _default_format_navigation_panel($$$$;$)
my $self = shift;
my $buttons = shift;
my $cmdname = shift;
- my $element = shift;
+ my $source_command = shift;
my $vertical = shift;
# if VERTICAL_HEAD_NAVIGATION, the buttons are in a vertical table which
@@ -3448,8 +3470,10 @@ sub _default_format_navigation_panel($$$$;$)
my ($active, $passive, $need_delimiter)
# API info: using the API to allow for customization would be:
- # = &{$self->formatting_function('format_button')}($self, $button);
- = &{$self->{'formatting_function'}->{'format_button'}}($self, $button);
+ # = &{$self->formatting_function('format_button')}($self, $button,
+ # $source_command);
+ = &{$self->{'formatting_function'}->{'format_button'}}($self, $button,
+ $source_command);
if ($self->get_conf('HEADER_IN_TABLE')) {
if (defined($active)) {
$result .= $active;
@@ -6296,8 +6320,12 @@ sub _convert_tree_unit_type($$$$)
}
}
$result .= $content;
+ my $command;
+ if ($element->{'extra'} and $element->{'extra'}->{'unit_command'}) {
+ $command = $element->{'extra'}->{'unit_command'};
+ }
$result .= &{$self->formatting_function('format_element_footer')}($self,
$type,
- $element,
$content);
+ $element,
$content, $command);
return $result;
}
@@ -6305,12 +6333,13 @@ sub _convert_tree_unit_type($$$$)
$default_types_conversion{'unit'} = \&_convert_tree_unit_type;
# for tree unit elements and special elements
-sub _default_format_element_footer($$$$)
+sub _default_format_element_footer($$$$;$)
{
my $self = shift;
my $type = shift;
my $element = shift;
my $content = shift;
+ my $command = shift;
my $result = '';
my $is_top = $self->element_is_tree_unit_top($element);
@@ -6402,8 +6431,10 @@ sub _default_format_element_footer($$$$)
$result .= "$rule\n" if ($rule);
}
if ($buttons) {
+ my $cmdname;
+ $cmdname = $command->{'cmdname'} if ($command and $command->{'cmdname'});
$result .= &{$self->formatting_function('format_navigation_panel')}($self,
- $buttons, undef, $element);
+ $buttons, $cmdname,
$command);
}
return $result;
@@ -8198,11 +8229,12 @@ sub _htmlxref($$)
return $self->{'htmlxref'}->{$file};
}
-sub _external_node_href($$$$)
+sub _external_node_href($$$;$)
{
my $self = shift;
my $external_node = shift;
my $filename = shift;
+ # for messages only
my $source_command = shift;
#print STDERR "external_node: ".join('|', keys(%$external_node))."\n";
@@ -8250,15 +8282,22 @@ sub _external_node_href($$$$)
$target_split = $default_target_split;
if ($self->get_conf('CHECK_HTMLXREF')) {
if (defined($source_command) and $source_command->{'source_info'}) {
- $self->line_warn($self, sprintf(__(
+ my $node_manual_key = $source_command.'-'.$manual_name;
+ if (!$self->{'check_htmlxref_already_warned'}->{$node_manual_key}) {
+ $self->line_warn($self, sprintf(__(
+ "no htmlxref.cnf entry found for `%s'"), $manual_name),
+ $source_command->{'source_info'});
+ $self->{'check_htmlxref_already_warned'}->{$node_manual_key} = 1;
+ }
+ } else {
+ if
(!$self->{'check_htmlxref_already_warned'}->{'UNDEF-'.$manual_name}) {
+ $self->document_warn($self, sprintf(__(
"no htmlxref.cnf entry found for `%s'"), $manual_name),
- $source_command->{'source_info'});
- } elsif (!$self->{'check_htmlxref_already_warned'}->{$manual_name}) {
- $self->document_warn($self, sprintf(__(
- "no htmlxref.cnf entry found for `%s'"), $manual_name),
- );
+ );
+ $self->{'check_htmlxref_already_warned'}->{'UNDEF-'.$manual_name}
= 1;
+ cluck;
+ }
}
- $self->{'check_htmlxref_already_warned'}->{$manual_name} = 1;
}
}
@@ -8718,18 +8757,19 @@ MathJax = {
$program, $generator);
}
-sub _get_links($$$)
+sub _get_links($$$$)
{
my $self = shift;
my $filename = shift;
my $element = shift;
+ my $node_command = shift;
my $links = '';
if ($self->get_conf('USE_LINKS')) {
my $link_buttons = $self->get_conf('LINKS_BUTTONS');
foreach my $link (@$link_buttons) {
my $link_href = $self->from_element_direction($link, 'href', $element,
- $filename);
+ $filename, $node_command);
#print STDERR "$link -> $link_href \n";
if ($link_href and $link_href ne '') {
my $link_string = $self->from_element_direction($link, 'string',
@@ -8753,17 +8793,26 @@ sub _default_format_begin_file($$$)
my $filename = shift;
my $element = shift;
- my $command;
- if ($element and $self->get_conf('SPLIT')) {
- $command = $self->tree_unit_element_command($element);
+ my ($element_command, $node_command, $command_for_title);
+ if ($element) {
+ $element_command = $self->tree_unit_element_command($element);
+ $node_command = $element_command;
+ if ($element_command->{'cmdname'} and $element_command->{'cmdname'} ne
'node'
+ and $element_command->{'extra'}
+ and $element_command->{'extra'}->{'associated_node'}) {
+ $node_command = $element_command->{'extra'}->{'associated_node'};
+ }
+
+ $command_for_title = $element_command if ($self->get_conf('SPLIT'));
}
my ($title, $description, $encoding, $date, $css_lines,
$doctype, $root_html_element_attributes, $bodytext, $copying_comment,
$after_body_open, $extra_head, $program_and_version,
$program_homepage,
- $program, $generator) = $self->_file_header_information($command,
$filename);
+ $program, $generator) =
$self->_file_header_information($command_for_title,
+ $filename);
- my $links = $self->_get_links($filename, $element);
+ my $links = $self->_get_links($filename, $element, $node_command);
my $result = "$doctype
<html${root_html_element_attributes}>
diff --git a/tp/t/html_tests.t b/tp/t/html_tests.t
index f8d97d14e5..9e21b7bd18 100644
--- a/tp/t/html_tests.t
+++ b/tp/t/html_tests.t
@@ -146,6 +146,25 @@ a@sup{b - \frac{\xi}{phi @copyright{}}} @dotless{i}
Some @math{a @minus{} b @geq{} @AA{} @^e}.
';
+my $check_htmlxref_text = '
+@node Top, (../there/no_existing_no_manual_direction), first, (dir)
+@top top
+
+@ref{a, b, c, no_existing_no_manual.info}
+@ref{a, b, c, no_existing_no_manual.info}
+
+@menu
+* first::
+* (other_no_existing_no_manual)::
+* chapter::
+@end menu
+
+@node first, (no_existing_no_manual.info)
+
+@node chapter, (chap_not_existing)
+@chapter Chapter
+';
+
my @test_cases = (
['verbatim_in_multitable_in_example',
@@ -487,20 +506,8 @@ undef, {'test_file' =>
'empty_lines_at_beginning_no_setfilename.texi'}
undef, {'test_file' =>
'empty_lines_at_beginning_no_setfilename_no_element.texi'}
],
['check_htmlxref',
-'
-@node Top, (../there/no_existing_no_manual_direction), first, (dir)
-@top top
-
-@ref{a, b, c, no_existing_no_manual.info}
-@ref{a, b, c, no_existing_no_manual.info}
-
-@menu
-* first::
-* (other_no_existing_no_manual)::
-@end menu
-
-@node first, (no_existing_no_manual.info)
-', {}, {'CHECK_HTMLXREF' => 1}],
+$check_htmlxref_text,
+{}, {'CHECK_HTMLXREF' => 1}],
['text_before_top_and_contents_after_title',
'
Some text before top
@@ -747,6 +754,12 @@ my @file_tests = (
'.$itemize_arguments_text
, {'ENABLE_ENCODING' => 1}
],
+['check_htmlxref_no_use_nodes',
+$check_htmlxref_text
+, {}, {'CHECK_HTMLXREF' => 1, 'USE_NODES', 0}],
+['check_htmlxref_menu',
+$check_htmlxref_text
+, {'FORMAT_MENU' => 'menu',}, {'FORMAT_MENU' => 'menu', 'CHECK_HTMLXREF' =>
1}],
);
@@ -759,6 +772,7 @@ foreach my $test (@test_cases_text) {
}
foreach my $test (@file_tests) {
push @{$test->[2]->{'test_formats'}}, 'file_html';
+ $test->[2]->{'test_input_file_name'} = $test->[0] . '.texi';
}
foreach my $test (@test_cases_file_text) {
push @{$test->[2]->{'test_formats'}}, ('html_text', 'file_html');
diff --git a/tp/t/results/html_tests/check_htmlxref.pl
b/tp/t/results/html_tests/check_htmlxref.pl
index bacba3cd8b..1256fdd263 100644
--- a/tp/t/results/html_tests/check_htmlxref.pl
+++ b/tp/t/results/html_tests/check_htmlxref.pl
@@ -445,6 +445,63 @@ $result_trees{'check_htmlxref'} = {
},
'type' => 'menu_entry'
},
+ {
+ 'args' => [
+ {
+ 'parent' => {},
+ 'text' => '* ',
+ 'type' => 'menu_entry_leading_text'
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'chapter'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'menu_entry_node'
+ },
+ {
+ 'parent' => {},
+ 'text' => '::',
+ 'type' => 'menu_entry_separator'
+ },
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'preformatted'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'menu_entry_description'
+ }
+ ],
+ 'extra' => {
+ 'menu_entry_description' => {},
+ 'menu_entry_node' => {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'chapter'
+ }
+ },
+ 'parent' => {},
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 11,
+ 'macro' => ''
+ },
+ 'type' => 'menu_entry'
+ },
{
'args' => [
{
@@ -471,7 +528,7 @@ $result_trees{'check_htmlxref'} = {
'parent' => {},
'source_info' => {
'file_name' => '',
- 'line_nr' => 11,
+ 'line_nr' => 12,
'macro' => ''
}
}
@@ -540,7 +597,14 @@ $result_trees{'check_htmlxref'} = {
}
],
'cmdname' => 'node',
- 'contents' => [],
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
'extra' => {
'node_content' => [
{}
@@ -564,7 +628,101 @@ $result_trees{'check_htmlxref'} = {
'parent' => {},
'source_info' => {
'file_name' => '',
- 'line_nr' => 13,
+ 'line_nr' => 14,
+ 'macro' => ''
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'chapter'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'line_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '('
+ },
+ {
+ 'parent' => {},
+ 'text' => 'chap_not_existing'
+ },
+ {
+ 'parent' => {},
+ 'text' => ')'
+ }
+ ],
+ 'extra' => {
+ 'spaces_after_argument' => '
+',
+ 'spaces_before_argument' => ' '
+ },
+ 'parent' => {},
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [
+ {}
+ ],
+ 'normalized' => 'chapter'
+ },
+ {
+ 'manual_content' => [
+ {}
+ ]
+ }
+ ],
+ 'normalized' => 'chapter',
+ 'spaces_before_argument' => ' '
+ },
+ 'parent' => {},
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 16,
+ 'macro' => ''
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'Chapter'
+ }
+ ],
+ 'extra' => {
+ 'spaces_after_argument' => '
+'
+ },
+ 'parent' => {},
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [],
+ 'extra' => {
+ 'spaces_before_argument' => ' '
+ },
+ 'parent' => {},
+ 'source_info' => {
+ 'file_name' => '',
+ 'line_nr' => 17,
'macro' => ''
}
}
@@ -642,10 +800,20 @@
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[2]{'ar
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[2]{'extra'}{'menu_entry_description'}
=
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[2]{'args'}[3];
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[2]{'extra'}{'menu_entry_node'}{'manual_content'}[0]
=
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[2]{'args'}[1]{'contents'}[1];
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[2]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3];
-$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[0];
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[0]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[1]{'contents'}[0]{'parent'}
=
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[1];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[1]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[2]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[3]{'contents'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[3]{'contents'}[0];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[3]{'contents'}[0]{'parent'}
=
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[3];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[3]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'extra'}{'menu_entry_description'}
=
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[3];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'extra'}{'menu_entry_node'}{'node_content'}[0]
=
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'args'}[1]{'contents'}[0];
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3];
-$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'extra'}{'end_command'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[3];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[4]{'args'}[0];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[4]{'args'}[0]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[4];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[4]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3];
+$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'extra'}{'end_command'}
= $result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'contents'}[4];
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[3]{'parent'} =
$result_trees{'check_htmlxref'}{'contents'}[2];
$result_trees{'check_htmlxref'}{'contents'}[2]{'contents'}[4]{'parent'} =
$result_trees{'check_htmlxref'}{'contents'}[2];
$result_trees{'check_htmlxref'}{'contents'}[2]{'parent'} =
$result_trees{'check_htmlxref'};
@@ -655,10 +823,24 @@
$result_trees{'check_htmlxref'}{'contents'}[3]{'args'}[1]{'contents'}[0]{'parent
$result_trees{'check_htmlxref'}{'contents'}[3]{'args'}[1]{'contents'}[1]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[3]{'args'}[1];
$result_trees{'check_htmlxref'}{'contents'}[3]{'args'}[1]{'contents'}[2]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[3]{'args'}[1];
$result_trees{'check_htmlxref'}{'contents'}[3]{'args'}[1]{'parent'} =
$result_trees{'check_htmlxref'}{'contents'}[3];
+$result_trees{'check_htmlxref'}{'contents'}[3]{'contents'}[0]{'parent'} =
$result_trees{'check_htmlxref'}{'contents'}[3];
$result_trees{'check_htmlxref'}{'contents'}[3]{'extra'}{'node_content'}[0] =
$result_trees{'check_htmlxref'}{'contents'}[3]{'args'}[0]{'contents'}[0];
$result_trees{'check_htmlxref'}{'contents'}[3]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
= $result_trees{'check_htmlxref'}{'contents'}[3]{'args'}[0]{'contents'}[0];
$result_trees{'check_htmlxref'}{'contents'}[3]{'extra'}{'nodes_manuals'}[1]{'manual_content'}[0]
= $result_trees{'check_htmlxref'}{'contents'}[3]{'args'}[1]{'contents'}[1];
$result_trees{'check_htmlxref'}{'contents'}[3]{'parent'} =
$result_trees{'check_htmlxref'};
+$result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[0];
+$result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[0]{'parent'} =
$result_trees{'check_htmlxref'}{'contents'}[4];
+$result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[1]{'contents'}[0]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[1];
+$result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[1]{'contents'}[1]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[1];
+$result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[1]{'contents'}[2]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[1];
+$result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[1]{'parent'} =
$result_trees{'check_htmlxref'}{'contents'}[4];
+$result_trees{'check_htmlxref'}{'contents'}[4]{'extra'}{'node_content'}[0] =
$result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[0]{'contents'}[0];
+$result_trees{'check_htmlxref'}{'contents'}[4]{'extra'}{'nodes_manuals'}[0]{'node_content'}[0]
= $result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[0]{'contents'}[0];
+$result_trees{'check_htmlxref'}{'contents'}[4]{'extra'}{'nodes_manuals'}[1]{'manual_content'}[0]
= $result_trees{'check_htmlxref'}{'contents'}[4]{'args'}[1]{'contents'}[1];
+$result_trees{'check_htmlxref'}{'contents'}[4]{'parent'} =
$result_trees{'check_htmlxref'};
+$result_trees{'check_htmlxref'}{'contents'}[5]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'check_htmlxref'}{'contents'}[5]{'args'}[0];
+$result_trees{'check_htmlxref'}{'contents'}[5]{'args'}[0]{'parent'} =
$result_trees{'check_htmlxref'}{'contents'}[5];
+$result_trees{'check_htmlxref'}{'contents'}[5]{'parent'} =
$result_trees{'check_htmlxref'};
$result_texis{'check_htmlxref'} = '
@node Top, (../there/no_existing_no_manual_direction), first, (dir)
@@ -670,9 +852,13 @@ $result_texis{'check_htmlxref'} = '
@menu
* first::
* (other_no_existing_no_manual)::
+* chapter::
@end menu
@node first, (no_existing_no_manual.info)
+
+@node chapter, (chap_not_existing)
+@chapter Chapter
';
@@ -685,7 +871,11 @@ a
* first::
* (other_no_existing_no_manual)::
+* chapter::
+
+1 Chapter
+*********
';
$result_sectioning{'check_htmlxref'} = {
@@ -703,6 +893,27 @@ $result_sectioning{'check_htmlxref'} = {
}
},
'structure' => {
+ 'section_childs' => [
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'chapter'
+ },
+ 'structure' => {}
+ }
+ },
+ 'structure' => {
+ 'section_level' => 1,
+ 'section_number' => 1,
+ 'section_up' => {},
+ 'toplevel_prev' => {},
+ 'toplevel_up' => {}
+ }
+ }
+ ],
'section_level' => 0,
'section_up' => {}
}
@@ -711,6 +922,9 @@ $result_sectioning{'check_htmlxref'} = {
'section_level' => -1
}
};
+$result_sectioning{'check_htmlxref'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
= $result_sectioning{'check_htmlxref'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'check_htmlxref'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_prev'}
= $result_sectioning{'check_htmlxref'}{'structure'}{'section_childs'}[0];
+$result_sectioning{'check_htmlxref'}{'structure'}{'section_childs'}[0]{'structure'}{'section_childs'}[0]{'structure'}{'toplevel_up'}
= $result_sectioning{'check_htmlxref'}{'structure'}{'section_childs'}[0];
$result_sectioning{'check_htmlxref'}{'structure'}{'section_childs'}[0]{'structure'}{'section_up'}
= $result_sectioning{'check_htmlxref'};
$result_nodes{'check_htmlxref'} = {
@@ -839,12 +1053,24 @@ Next: <a href="no_existing_no_manual_direction.html#Top"
accesskey="n" rel="next
<a data-manual="no_existing_no_manual.info"
href="no_existing_no_manual.html#a">(no_existing_no_manual.info)c</a>
</p>
+<ul class="mini-toc">
+<li><a href="#chapter" accesskey="1">Chapter</a></li>
+</ul>
<hr>
<a class="node-id" id="first"></a><div class="nav-panel">
<p>
Next: <a href="no_existing_no_manual.html#Top" accesskey="n"
rel="next">(no_existing_no_manual.info)</a> </p>
</div>
<h4 class="node">first</h4>
+
+<hr>
+<div class="chapter-level-extent" id="chapter">
+<div class="nav-panel">
+<p>
+Next: <a href="chap_not_existing.html#Top" accesskey="n"
rel="next">(chap_not_existing)</a> </p>
+</div>
+<h2 class="chapter" id="Chapter">1 Chapter</h2>
+</div>
</div>
@@ -857,12 +1083,18 @@ $result_converted_errors{'html'}->{'check_htmlxref'} = [
{
'error_line' => 'warning: no htmlxref.cnf entry found for
`../there/no_existing_no_manual_direction\'
',
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => '',
'text' => 'no htmlxref.cnf entry found for
`../there/no_existing_no_manual_direction\'',
'type' => 'warning'
},
{
'error_line' => 'warning: no htmlxref.cnf entry found for `dir\'
',
+ 'file_name' => '',
+ 'line_nr' => 2,
+ 'macro' => '',
'text' => 'no htmlxref.cnf entry found for `dir\'',
'type' => 'warning'
},
@@ -883,6 +1115,24 @@ $result_converted_errors{'html'}->{'check_htmlxref'} = [
'macro' => '',
'text' => 'no htmlxref.cnf entry found for `no_existing_no_manual.info\'',
'type' => 'warning'
+ },
+ {
+ 'error_line' => 'warning: no htmlxref.cnf entry found for
`no_existing_no_manual.info\'
+',
+ 'file_name' => '',
+ 'line_nr' => 14,
+ 'macro' => '',
+ 'text' => 'no htmlxref.cnf entry found for `no_existing_no_manual.info\'',
+ 'type' => 'warning'
+ },
+ {
+ 'error_line' => 'warning: no htmlxref.cnf entry found for
`chap_not_existing\'
+',
+ 'file_name' => '',
+ 'line_nr' => 16,
+ 'macro' => '',
+ 'text' => 'no htmlxref.cnf entry found for `chap_not_existing\'',
+ 'type' => 'warning'
}
];
diff --git a/tp/t/results/html_tests/itemize_arguments.pl
b/tp/t/results/html_tests/itemize_arguments.pl
index d13ee3e4f7..4a32e0a69c 100644
--- a/tp/t/results/html_tests/itemize_arguments.pl
+++ b/tp/t/results/html_tests/itemize_arguments.pl
@@ -5910,6 +5910,7 @@
$result_converted_errors{'file_html'}->{'itemize_arguments'} = [
{
'error_line' => 'warning: must specify a title with a title command or @top
',
+ 'file_name' => 'itemize_arguments.texi',
'text' => 'must specify a title with a title command or @top',
'type' => 'warning'
}
diff --git a/tp/t/results/html_tests/itemize_arguments_enable_encoding.pl
b/tp/t/results/html_tests/itemize_arguments_enable_encoding.pl
index 638319314a..73c6d06995 100644
--- a/tp/t/results/html_tests/itemize_arguments_enable_encoding.pl
+++ b/tp/t/results/html_tests/itemize_arguments_enable_encoding.pl
@@ -5910,6 +5910,7 @@
$result_converted_errors{'file_html'}->{'itemize_arguments_enable_encoding'} = [
{
'error_line' => 'warning: must specify a title with a title command or @top
',
+ 'file_name' => 'itemize_arguments_enable_encoding.texi',
'text' => 'must specify a title with a title command or @top',
'type' => 'warning'
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Pass source element command information to directions formatting,
Patrice Dumas <=