[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Structuring.pm (units_directions): f
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Structuring.pm (units_directions): fix getting associated_section for NodeForward. Fix one case of FastBack setting. |
Date: |
Sat, 30 Mar 2024 10:14:44 -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 e4152e6fcd * tp/Texinfo/Structuring.pm (units_directions): fix getting
associated_section for NodeForward. Fix one case of FastBack setting.
e4152e6fcd is described below
commit e4152e6fcdabf74f3abf446a6eb19e32ce5befad
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Mar 30 15:14:34 2024 +0100
* tp/Texinfo/Structuring.pm (units_directions): fix getting
associated_section for NodeForward. Fix one case of FastBack setting.
---
ChangeLog | 5 +++++
tp/Texinfo/Structuring.pm | 17 +++++++++++------
tp/t/results/moresectioning/complex_split_at_node.pl | 9 +++++++++
3 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9f32ce900d..86eaa637b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-03-30 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Structuring.pm (units_directions): fix getting
+ associated_section for NodeForward. Fix one case of FastBack setting.
+
2024-03-30 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/structuring_transfo/structuring.c
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 6fa28d26b2..64748b820f 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -1949,17 +1949,22 @@ sub units_directions($$$)
and $node->{'extra'}->{'node_directions'}->{$direction->[1]});
}
# Now do NodeForward which is something like the following node.
+ my $associated_section;
my $automatic_directions
= (not ($node->{'args'} and scalar(@{$node->{'args'}}) > 1));
+ if ($automatic_directions and $node->{'extra'}
+ and $node->{'extra'}->{'associated_section'}) {
+ $associated_section = $node->{'extra'}->{'associated_section'};
+ }
my $menu_child = _first_menu_node($node, $identifier_target);
if ($menu_child) {
$directions->{'NodeForward'}
= _label_target_unit_element($menu_child);
- } elsif ($automatic_directions and $node->{'associated_section'}
- and $node->{'associated_section'}->{'extra'}->{'section_childs'}
- and $node->{'associated_section'}->{'extra'}->{'section_childs'}->[0]) {
+ } elsif ($associated_section
+ and $associated_section->{'extra'}->{'section_childs'}
+ and $associated_section->{'extra'}->{'section_childs'}->[0]) {
$directions->{'NodeForward'}
- = $node->{'associated_section'}->{'extra'}
+ = $associated_section->{'extra'}
->{'section_childs'}->[0]->{'associated_unit'};
} elsif ($node->{'extra'}->{'node_directions'}
and $node->{'extra'}->{'node_directions'}->{'next'}) {
@@ -2022,9 +2027,9 @@ sub units_directions($$$)
}
if ($section->{'extra'}->{'section_level'} <= 1) {
$directions->{'FastBack'} = $section_output_unit;
- } elsif ($section_output_unit->{'directions'}->{'Fastback'}) {
+ } elsif ($section_output_unit->{'directions'}->{'FastBack'}) {
$directions->{'FastBack'}
- = $section_output_unit->{'directions'}->{'Fastback'};
+ = $section_output_unit->{'directions'}->{'FastBack'};
}
}
} else {
diff --git a/tp/t/results/moresectioning/complex_split_at_node.pl
b/tp/t/results/moresectioning/complex_split_at_node.pl
index 85994a636b..1842dfc8bf 100644
--- a/tp/t/results/moresectioning/complex_split_at_node.pl
+++ b/tp/t/results/moresectioning/complex_split_at_node.pl
@@ -2721,6 +2721,7 @@ $result_sectioning{'complex_split_at_node'} = {
},
'unit_type' => 'unit'
},
+ 'FastBack' => {},
'FastForward' => {},
'Forward' => {},
'NodeUp' => {},
@@ -3156,6 +3157,7 @@
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'assoc
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Up'}
=
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'};
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'tree_unit_directions'}{'prev'}
=
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'};
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'unit_command'}{'associated_unit'}
=
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'};
+$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'FastBack'}
=
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'};
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'FastForward'}
=
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'};
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Forward'}
=
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'};
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'NodeUp'}
=
$result_sectioning{'complex_split_at_node'}{'extra'}{'section_childs'}[0]{'associated_unit'};
@@ -3593,6 +3595,7 @@ $result_nodes{'complex_split_at_node'} = [
'unit_command' => {},
'unit_type' => 'unit'
},
+ 'FastBack' => {},
'FastForward' => {},
'Forward' => {},
'NodeUp' => {},
@@ -3950,6 +3953,7 @@
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'Fast
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'tree_unit_directions'}{'next'}
=
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'};
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'tree_unit_directions'}{'prev'}
=
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'};
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'unit_command'}
=
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'B
[...]
+$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'FastBack'}
=
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'};
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'FastForward'}
=
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'};
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Forward'}
=
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'};
$result_nodes{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'NodeUp'}
= $result_nodes{'complex_split_at_node'}[0]{'associated_unit'};
@@ -4425,6 +4429,7 @@ $result_menus{'complex_split_at_node'} = [
'unit_command' => {},
'unit_type' => 'unit'
},
+ 'FastBack' => {},
'FastForward' => {},
'Forward' => {},
'NodeUp' => {},
@@ -4691,6 +4696,7 @@
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'Fast
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'tree_unit_directions'}{'next'}
=
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'};
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'tree_unit_directions'}{'prev'}
=
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'};
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'unit_command'}
=
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'B
[...]
+$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'FastBack'}
=
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'};
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'FastForward'}
=
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'};
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Forward'}
=
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'};
$result_menus{'complex_split_at_node'}[0]{'associated_unit'}{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'NodeUp'}
= $result_menus{'complex_split_at_node'}[0]{'associated_unit'};
@@ -5088,6 +5094,7 @@ $result_elements{'complex_split_at_node'} = [
'unit_command' => {},
'unit_type' => 'unit'
},
+ 'FastBack' => {},
'FastForward' => {},
'Forward' => {},
'NodeUp' => {},
@@ -5311,6 +5318,7 @@
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'direc
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'This'}
=
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'};
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Up'}
= $result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'};
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'unit_command'}
=
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'directions'}{'Back'}{'unit_command'}{'extra'}{'
[...]
+$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'FastBack'}
= $result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'};
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'FastForward'}
=
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'};
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'Forward'}
=
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'};
$result_elements{'complex_split_at_node'}[0]{'directions'}{'FastForward'}{'directions'}{'FastForward'}{'directions'}{'Back'}{'directions'}{'NodeUp'}
= $result_elements{'complex_split_at_node'}[0];
@@ -5481,6 +5489,7 @@ output unit: @node between node
Forward: @node Second node
Back: @node numbered
FastForward: @node Second node
+ FastBack: @node First node
NodeUp: @node Top
output unit: @node Second node
This: @node Second node
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Structuring.pm (units_directions): fix getting associated_section for NodeForward. Fix one case of FastBack setting.,
Patrice Dumas <=