[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/NodeNameNormalization.pm (se
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/NodeNameNormalization.pm (set_nodes_list_labels): remove code related to structures not present for target elements anymore. Reindent. |
Date: |
Sun, 26 Feb 2023 10:39:19 -0500 |
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 07194dbfcd * tp/Texinfo/Convert/NodeNameNormalization.pm
(set_nodes_list_labels): remove code related to structures not present for
target elements anymore. Reindent.
07194dbfcd is described below
commit 07194dbfcd736b62dc059a53d47e3f308fc2ece4
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Feb 26 16:39:14 2023 +0100
* tp/Texinfo/Convert/NodeNameNormalization.pm (set_nodes_list_labels):
remove code related to structures not present for target elements
anymore.
Reindent.
---
ChangeLog | 7 +++++
tp/Texinfo/Convert/NodeNameNormalization.pm | 48 +++++++++++++----------------
tp/t/results/sectioning/double_top.pl | 1 -
3 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b1685001d9..64f153d6e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-02-26 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/NodeNameNormalization.pm (set_nodes_list_labels):
+ remove code related to structures not present for target elements
+ anymore.
+ Reindent.
+
2023-02-26 Arsen Arsenović <arsen@aarsen.me>
install-info: Invert umask in mode computation
diff --git a/tp/Texinfo/Convert/NodeNameNormalization.pm
b/tp/Texinfo/Convert/NodeNameNormalization.pm
index 98d27d5086..f480f74981 100644
--- a/tp/Texinfo/Convert/NodeNameNormalization.pm
+++ b/tp/Texinfo/Convert/NodeNameNormalization.pm
@@ -354,10 +354,10 @@ sub set_nodes_list_labels($$$)
if ($target->{'cmdname'} eq 'node') {
if ($target->{'extra'} and $target->{'extra'}->{'nodes_manuals'}) {
foreach my $node_manual (@{$target->{'extra'}->{'nodes_manuals'}}) {
- if (defined $node_manual
- and defined $node_manual->{'node_content'}) {
- my $normalized =
Texinfo::Convert::NodeNameNormalization::normalize_node(
- {'contents' =>
$node_manual->{'node_content'}});
+ if (defined($node_manual) and $node_manual->{'node_content'}) {
+ my $normalized
+ = Texinfo::Convert::NodeNameNormalization::normalize_node(
+ {'contents' =>
$node_manual->{'node_content'}});
$node_manual->{'normalized'} = $normalized;
}
}
@@ -365,38 +365,33 @@ sub set_nodes_list_labels($$$)
}
my $label_element = Texinfo::Common::get_label_element($target);
if ($label_element and $label_element->{'contents'}) {
- my $normalized =
Texinfo::Convert::NodeNameNormalization::normalize_node(
- $label_element);
+ my $normalized
+ = Texinfo::Convert::NodeNameNormalization::normalize_node(
+ $label_element);
if ($normalized !~ /[^-]/) {
$registrar->line_error($configuration_information,
- sprintf(__("empty node name after expansion `%s'"),
- # convert the contents only, to avoid spaces
- Texinfo::Convert::Texinfo::convert_to_texinfo(
- {'contents' =>
$label_element->{'contents'}})),
- $target->{'source_info'});
- delete $target->{'extra'}->{'node_content'};
+ sprintf(__("empty node name after expansion `%s'"),
+ # convert the contents only, to avoid spaces
+ Texinfo::Convert::Texinfo::convert_to_texinfo(
+ {'contents' => $label_element->{'contents'}})),
+ $target->{'source_info'});
} else {
if (defined $labels{$normalized}) {
$registrar->line_error($configuration_information,
- sprintf(__("\@%s `%s' previously defined"),
- $target->{'cmdname'},
- Texinfo::Convert::Texinfo::convert_to_texinfo({'contents'
- => $label_element->{'contents'}})),
- $target->{'source_info'});
+ sprintf(__("\@%s `%s' previously defined"),
+ $target->{'cmdname'},
+ Texinfo::Convert::Texinfo::convert_to_texinfo(
+ {'contents' => $label_element->{'contents'}})),
+ $target->{'source_info'});
$registrar->line_error($configuration_information,
- sprintf(__("here is the previous definition as \@%s"),
- $labels{$normalized}->{'cmdname'}),
- $labels{$normalized}->{'source_info'}, 1);
- delete $target->{'extra'}->{'node_content'};
+ sprintf(__("here is the previous definition as \@%s"),
+ $labels{$normalized}->{'cmdname'}),
+ $labels{$normalized}->{'source_info'}, 1);
} else {
$labels{$normalized} = $target;
+ $target->{'extra'} = {} if (!$target->{'extra'});
$target->{'extra'}->{'normalized'} = $normalized;
if ($target->{'cmdname'} eq 'node') {
- if ($target->{'extra'}
- and $target->{'extra'}->{'node_argument'}) {
- $target->{'extra'}->{'node_argument'}->{'normalized'}
- = $normalized;
- }
push @{$self->{'nodes'}}, $target;
}
}
@@ -406,7 +401,6 @@ sub set_nodes_list_labels($$$)
$registrar->line_error($configuration_information,
sprintf(__("empty argument in \@%s"),
$target->{'cmdname'}), $target->{'source_info'});
- delete $target->{'extra'}->{'node_content'};
}
}
}
diff --git a/tp/t/results/sectioning/double_top.pl
b/tp/t/results/sectioning/double_top.pl
index bcc52ec334..732cd6dabf 100644
--- a/tp/t/results/sectioning/double_top.pl
+++ b/tp/t/results/sectioning/double_top.pl
@@ -123,7 +123,6 @@ $result_trees{'double_top'} = {
}
],
'cmdname' => 'anchor',
- 'extra' => {},
'source_info' => {
'file_name' => '',
'line_nr' => 5,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/NodeNameNormalization.pm (set_nodes_list_labels): remove code related to structures not present for target elements anymore. Reindent.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/Convert/NodeNameNormalization.pm (set_nodes_list_labels), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/ParserNonXS.pm (_end_line_misc_line), tp/Texinfo/Structuring.pm, tp/Texinfo/Transformations.pm (_new_node) (_get_non_automatic_nodes_with_sections), tp/Texinfo/XS/parsetexi/api.c (store_additional_info), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line): do not put the node name itself in extra nodes_manuals, only the node directions.
- Next by Date:
branch master updated: Add NO_GRATUITOUS_UTF8 (name could change)
- Previous by thread:
branch master updated: * tp/Texinfo/Convert/NodeNameNormalization.pm (set_nodes_list_labels), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/ParserNonXS.pm (_end_line_misc_line), tp/Texinfo/Structuring.pm, tp/Texinfo/Transformations.pm (_new_node) (_get_non_automatic_nodes_with_sections), tp/Texinfo/XS/parsetexi/api.c (store_additional_info), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line): do not put the node name itself in extra nodes_manuals, only the node directions.
- Next by thread:
branch master updated: Add NO_GRATUITOUS_UTF8 (name could change)
- Index(es):