[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Translations.pm (complete_indices) (
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Translations.pm (complete_indices) (_non_bracketed_contents): fix _non_bracketed_contents by using 'bracketed_arg' as the type, to match with the type on @def* lines. But do not call _non_bracketed_contents as it is not clear that it is better to avoid the 'bracketed_arg' type. |
Date: |
Fri, 10 Mar 2023 14:18: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 72c4f13b51 * tp/Texinfo/Translations.pm (complete_indices)
(_non_bracketed_contents): fix _non_bracketed_contents by using 'bracketed_arg'
as the type, to match with the type on @def* lines. But do not call
_non_bracketed_contents as it is not clear that it is better to avoid the
'bracketed_arg' type.
72c4f13b51 is described below
commit 72c4f13b51f61127610a6adf9bd8a4205f68f272
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Mar 10 20:18:03 2023 +0100
* tp/Texinfo/Translations.pm (complete_indices)
(_non_bracketed_contents): fix _non_bracketed_contents by using
'bracketed_arg' as the type, to match with the type on @def* lines.
But do not call _non_bracketed_contents as it is not clear that it is
better to avoid the 'bracketed_arg' type.
---
ChangeLog | 8 ++++++++
tp/Texinfo/Translations.pm | 23 +++++++++++++----------
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 66e6e6d61d..798ca0f75b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-03-10 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Translations.pm (complete_indices)
+ (_non_bracketed_contents): fix _non_bracketed_contents by using
+ 'bracketed_arg' as the type, to match with the type on @def* lines.
+ But do not call _non_bracketed_contents as it is not clear that it is
+ better to avoid the 'bracketed_arg' type.
+
2023-03-10 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/Texinfo.pm (convert_to_texinfo),
diff --git a/tp/Texinfo/Translations.pm b/tp/Texinfo/Translations.pm
index 4d979c16ad..364cf6f9d6 100644
--- a/tp/Texinfo/Translations.pm
+++ b/tp/Texinfo/Translations.pm
@@ -351,13 +351,14 @@ sub pgdt($$$;$$$)
return $self->gdt($string, $replaced_substrings, $translation_context,
$type, $lang);
}
-
+# FIXME currently not used. See below how it could be used to avoid having the
+# 'bracketed_arg' type in @def* index entries trees
sub _non_bracketed_contents($) {
my $current = shift;
- if ($current->{'type'} and $current->{'type'} eq 'bracketed') {
+ if ($current->{'type'} and $current->{'type'} eq 'bracketed_arg') {
my $new = {};
- $new->{'contents'} = $current->{'contents'} if ($current->{'parent'});
+ $new->{'contents'} = $current->{'contents'} if ($current->{'contents'});
$new->{'parent'} = $current->{'parent'} if ($current->{'parent'});
return $new;
} else {
@@ -422,9 +423,10 @@ sub complete_indices($)
{'name' => $name, 'class' => $class},
undef, undef, $entry_language);
$index_contents_normalized
- = [_non_bracketed_contents($name),
- { 'text' => ' on '},
- _non_bracketed_contents($class)];
+ = [$name, { 'text' => ' on '}, $class];
+ #= [_non_bracketed_contents($name),
+ # {'text' => ' on '},
+ # _non_bracketed_contents($class)];
} elsif ($def_command eq 'defcv'
or $def_command eq 'defivar'
or $def_command eq 'deftypeivar'
@@ -433,13 +435,14 @@ sub complete_indices($)
{'name' => $name, 'class' => $class},
undef, undef, $entry_language);
$index_contents_normalized
- = [_non_bracketed_contents($name),
- { 'text' => ' of '},
- _non_bracketed_contents($class)];
+ = [$name, {'text' => ' of '}, $class];
+ #= [_non_bracketed_contents($name),
+ # {'text' => ' of '},
+ # _non_bracketed_contents($class)];
}
# FIXME the 'parent' of the tree elements that correspond to name and
- # class, be them from gdt or from _non_bracketed_contents, are in the
+ # class, be them from gdt or from the elements, are in the
# main tree in the definition command arguments, while the new text
has
# either no parent (for index_contents_normalized) or the 'root_line'
# container returned by gdt.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Translations.pm (complete_indices) (_non_bracketed_contents): fix _non_bracketed_contents by using 'bracketed_arg' as the type, to match with the type on @def* lines. But do not call _non_bracketed_contents as it is not clear that it is better to avoid the 'bracketed_arg' type.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/Convert/Texinfo.pm (convert_to_texinfo), tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), tp/Texinfo/ParserNonXS.pm (_split_def_args, _parse_def) (_end_line_def_line), tp/Texinfo/XS/parsetexi/convert.c (convert_to_texinfo_internal), tp/Texinfo/XS/parsetexi/def.c (next_bracketed_or_word_agg, split_delimiters), tp/Texinfo/XS/parsetexi/element_types.txt, tp/Texinfo/XS/parsetexi/end_line.c (end_line_def_line): rename bracketed_def_content as bracketed_arg.
- Next by Date:
branch master updated: * tp/Texinfo/Convert/DocBook.pm (_convert), tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/Convert/TextContent.pm (_convert), tp/Texinfo/ParserNonXS.pm (_close_current, _split_def_args) (_end_line_starting_block, _handle_close_brace), tp/Texinfo/XS/parsetexi/close.c (close_current), tp/Texinfo/XS/parsetexi/def.c (split_def_args), tp/Texinfo/XS/parsetexi/end [...]
- Previous by thread:
branch master updated: * tp/Texinfo/Convert/Texinfo.pm (convert_to_texinfo), tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), tp/Texinfo/ParserNonXS.pm (_split_def_args, _parse_def) (_end_line_def_line), tp/Texinfo/XS/parsetexi/convert.c (convert_to_texinfo_internal), tp/Texinfo/XS/parsetexi/def.c (next_bracketed_or_word_agg, split_delimiters), tp/Texinfo/XS/parsetexi/element_types.txt, tp/Texinfo/XS/parsetexi/end_line.c (end_line_def_line): rename bracketed_def_content as bracketed_arg.
- Next by thread:
branch master updated: * tp/Texinfo/Convert/DocBook.pm (_convert), tp/Texinfo/Convert/LaTeX.pm (_convert), tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/Convert/TexinfoMarkup.pm (_convert), tp/Texinfo/Convert/Text.pm (_convert), tp/Texinfo/Convert/TextContent.pm (_convert), tp/Texinfo/ParserNonXS.pm (_close_current, _split_def_args) (_end_line_starting_block, _handle_close_brace), tp/Texinfo/XS/parsetexi/close.c (close_current), tp/Texinfo/XS/parsetexi/def.c (split_def_args), tp/Texinfo/XS/parsetexi/end [...]
- Index(es):