[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Converter.pm (converter), tp
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Converter.pm (converter), tp/Texinfo/Convert/Text.pm (converter), tp/Texinfo/Convert/HTML.pm (get_value, _prepare_index_entries), tp/Texinfo/Convert/LaTeX.pm (_prepare_indices), tp/Texinfo/Convert/Plaintext.pm (process_printindex), tp/maintain/template.pod: set 'values' and 'indices_information' from the parser in converter. Do not keep the direct association with the parser. |
Date: |
Fri, 28 Jan 2022 08:54:51 -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 1d567dbf0d * tp/Texinfo/Convert/Converter.pm (converter),
tp/Texinfo/Convert/Text.pm (converter), tp/Texinfo/Convert/HTML.pm (get_value,
_prepare_index_entries), tp/Texinfo/Convert/LaTeX.pm (_prepare_indices),
tp/Texinfo/Convert/Plaintext.pm (process_printindex), tp/maintain/template.pod:
set 'values' and 'indices_information' from the parser in converter. Do not
keep the direct association with the parser.
1d567dbf0d is described below
commit 1d567dbf0d60a137c40ec8ffa59c4dde8ab4aad1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Jan 28 14:54:35 2022 +0100
* tp/Texinfo/Convert/Converter.pm (converter),
tp/Texinfo/Convert/Text.pm (converter),
tp/Texinfo/Convert/HTML.pm (get_value, _prepare_index_entries),
tp/Texinfo/Convert/LaTeX.pm (_prepare_indices),
tp/Texinfo/Convert/Plaintext.pm (process_printindex),
tp/maintain/template.pod:
set 'values' and 'indices_information' from the parser in
converter. Do not keep the direct association with the
parser.
* tp/Texinfo/Convert/*.pm: regenerate pod section of converters
that have a pod section generated from maintain/template.pod.
---
ChangeLog | 15 ++++++++++++++
tp/Texinfo/Convert/Converter.pm | 10 ++++++----
tp/Texinfo/Convert/DocBook.pm | 23 ++++++++++++++-------
tp/Texinfo/Convert/HTML.pm | 43 ++++++++++++++++++++++++----------------
tp/Texinfo/Convert/IXIN.pm | 4 ++--
tp/Texinfo/Convert/Info.pm | 23 ++++++++++++++-------
tp/Texinfo/Convert/LaTeX.pm | 12 +++++------
tp/Texinfo/Convert/Plaintext.pm | 29 +++++++++++++++++----------
tp/Texinfo/Convert/TexinfoXML.pm | 33 +++++++++++++++++++-----------
tp/Texinfo/Convert/Text.pm | 1 +
tp/Texinfo/Translations.pm | 5 +++++
tp/maintain/template.pod | 3 ++-
tp/texi2any.pl | 5 ++++-
13 files changed, 139 insertions(+), 67 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8d2c137fac..20494e1659 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2022-01-28 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/Converter.pm (converter),
+ tp/Texinfo/Convert/Text.pm (converter),
+ tp/Texinfo/Convert/HTML.pm (get_value, _prepare_index_entries),
+ tp/Texinfo/Convert/LaTeX.pm (_prepare_indices),
+ tp/Texinfo/Convert/Plaintext.pm (process_printindex),
+ tp/maintain/template.pod:
+ set 'values' and 'indices_information' from the parser in
+ converter. Do not keep the direct association with the
+ parser.
+
+ * tp/Texinfo/Convert/*.pm: regenerate pod section of converters
+ that have a pod section generated from maintain/template.pod.
+
2022-01-27 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/LaTeX.pm (_convert): with ENABLE_ENCODING
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 87d2e21009..f1c5ec2408 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -195,14 +195,16 @@ sub converter(;$)
if ($conf->{'parser'}) {
$converter->{'parser'} = $conf->{'parser'};
$converter->{'global_commands'}
- = $converter->{'parser'}->global_commands_information();
- $converter->{'parser_info'} =
$converter->{'parser'}->global_informations();
- my $floats = $converter->{'parser'}->floats_information();
+ = $conf->{'parser'}->global_commands_information();
+ $converter->{'parser_info'} = $conf->{'parser'}->global_informations();
+ my $floats = $conf->{'parser'}->floats_information();
my ($labels, $targets_list, $nodes_list)
- = $converter->{'parser'}->labels_information();
+ = $conf->{'parser'}->labels_information();
$converter->{'floats'} = $floats if ($floats);
$converter->{'labels'} = $labels if ($labels);
+ $converter->{'indices_information'} =
$conf->{'parser'}->indices_information();
+ $converter->{'values'} = $conf->{'parser'}->{'values'};
delete $conf->{'parser'};
}
foreach my $key (keys(%$conf)) {
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index a8423a8da6..65d293af32 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -1470,7 +1470,6 @@ sub _convert($$;$)
1;
__END__
-# $Id$
# Automatically generated from maintain/template.pod
=head1 NAME
@@ -1479,7 +1478,7 @@ Texinfo::Convert::DocBook - Convert Texinfo tree to
DocBook
=head1 SYNOPSIS
- my $converter
+ my $converter
= Texinfo::Convert::DocBook->converter({'parser' => $parser});
$converter->output($tree);
@@ -1496,13 +1495,14 @@ Texinfo::Convert::DocBook converts a Texinfo tree to
DocBook.
=item $converter = Texinfo::Convert::DocBook->converter($options)
-Initialize converter from Texinfo to DocBook.
+Initialize converter from Texinfo to DocBook.
The I<$options> hash reference holds options for the converter. In
-this option hash reference a parser object may be associated with the
+this option hash reference a parser object may be associated with the
I<parser> key. The other options should be configuration options
described in the Texinfo manual. Those options, when appropriate,
-override the document content.
+override the document content. The parser should not be available
+directly anymore after getting the associated information.
See L<Texinfo::Convert::Converter> for more informations.
@@ -1513,12 +1513,12 @@ described in the Texinfo manual.
=item $result = $converter->convert($tree)
-Convert a Texinfo tree I<$tree> or tree portion and return
+Convert a Texinfo tree I<$tree> or tree portion and return
the resulting output.
=item $result = $converter->convert_tree($tree)
-Convert a Texinfo tree portion I<$tree> and return the resulting
+Convert a Texinfo tree portion I<$tree> and return the resulting
output. This function does not try to output a full document but only
portions. For a full document use C<convert>.
@@ -1528,4 +1528,13 @@ portions. For a full document use C<convert>.
Patrice Dumas, E<lt>pertusus@free.frE<gt>
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2016 Free Software Foundation, Inc.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
=cut
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 923abfab8e..0792f02477 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -1344,9 +1344,9 @@ sub get_value($$)
{
my $self = shift;
my $value = shift;
- if (defined($self->{'parser'})
- and exists ($self->{'parser'}->{'values'}->{$value})) {
- return $self->{'parser'}->{'values'}->{$value};
+ if (defined($self->{'values'})
+ and exists ($self->{'values'}->{$value})) {
+ return $self->{'values'}->{$value};
} else {
return undef;
}
@@ -1740,7 +1740,7 @@ my %defaults = (
[ 'Prev',
\&_default_panel_button_dynamic_direction_section_footer ],
[ 'Up',
\&_default_panel_button_dynamic_direction_section_footer ], ' ',
'Contents', 'Index'],
- 'LINKS_BUTTONS' => ['Top', 'Index', 'Contents', 'About',
+ 'LINKS_BUTTONS' => ['Top', 'Index', 'Contents', 'About',
'NodeUp', 'NodeNext', 'NodePrev'],
'NODE_FOOTER_BUTTONS' => [[ 'Next',
\&_default_panel_button_dynamic_direction_node_footer ],
[ 'Prev',
\&_default_panel_button_dynamic_direction_node_footer ],
@@ -2108,7 +2108,7 @@ my %default_commands_args = (
);
foreach my $explained_command (keys(%explained_commands)) {
- $default_commands_args{$explained_command}
+ $default_commands_args{$explained_command}
= [['normal'], ['string']];
}
@@ -2157,7 +2157,7 @@ foreach my $ignored_brace_commands ('caption',
'shortcaption',
# used to determine the first line, in fact.
my %advance_paragraph_count_commands;
foreach my $command (keys(%block_commands)) {
- next if ($menu_commands{$command}
+ next if ($menu_commands{$command}
or $block_commands{$command} eq 'raw');
$advance_paragraph_count_commands{$command} = 1;
}
@@ -2741,8 +2741,8 @@ sub _convert_footnote_command($$$$)
} else {
# This should rarely happen, except for @footnote in @copying and
# multiple @insertcopying...
- # Here it is not checked that there is no clash with another anchor.
- # However, unless there are more than 1000 footnotes this should not
+ # Here it is not checked that there is no clash with another anchor.
+ # However, unless there are more than 1000 footnotes this should not
# happen.
$footid .= '_'.$$foot_num;
$docid .= '_'.$$foot_num;
@@ -7901,12 +7901,12 @@ sub _prepare_index_entries($)
{
my $self = shift;
- if ($self->{'parser'}) {
+ my $index_names = $self->{'indices_information'};
+ if ($index_names) {
my $no_unidecode;
$no_unidecode = 1 if (defined($self->get_conf('USE_UNIDECODE'))
and !$self->get_conf('USE_UNIDECODE'));
- my $index_names = $self->{'parser'}->indices_information();
my $merged_index_entries
= Texinfo::Structuring::merge_indices($index_names);
my $index_entries_sort_strings;
@@ -10115,7 +10115,6 @@ sub _set_variables_texi2html()
1;
__END__
-# $Id$
# Automatically generated from maintain/template.pod
=head1 NAME
@@ -10124,7 +10123,7 @@ Texinfo::Convert::HTML - Convert Texinfo tree to HTML
=head1 SYNOPSIS
- my $converter
+ my $converter
= Texinfo::Convert::HTML->converter({'parser' => $parser});
$converter->output($tree);
@@ -10142,13 +10141,14 @@ Texinfo::Convert::HTML converts a Texinfo tree to
HTML.
=item $converter = Texinfo::Convert::HTML->converter($options)
-Initialize converter from Texinfo to HTML.
+Initialize converter from Texinfo to HTML.
The I<$options> hash reference holds options for the converter. In
-this option hash reference a parser object may be associated with the
+this option hash reference a parser object may be associated with the
I<parser> key. The other options should be configuration options
described in the Texinfo manual. Those options, when appropriate,
-override the document content.
+override the document content. The parser should not be available
+directly anymore after getting the associated information.
See L<Texinfo::Convert::Converter> for more informations.
@@ -10159,12 +10159,12 @@ described in the Texinfo manual.
=item $result = $converter->convert($tree)
-Convert a Texinfo tree I<$tree> or tree portion and return
+Convert a Texinfo tree I<$tree> or tree portion and return
the resulting output.
=item $result = $converter->convert_tree($tree)
-Convert a Texinfo tree portion I<$tree> and return the resulting
+Convert a Texinfo tree portion I<$tree> and return the resulting
output. This function does not try to output a full document but only
portions. For a full document use C<convert>.
@@ -10180,4 +10180,13 @@ specification. This is only supported in (and
relevant for) HTML.
Patrice Dumas, E<lt>pertusus@free.frE<gt>
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2016 Free Software Foundation, Inc.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
=cut
diff --git a/tp/Texinfo/Convert/IXIN.pm b/tp/Texinfo/Convert/IXIN.pm
index fd820f8e95..41496e2974 100644
--- a/tp/Texinfo/Convert/IXIN.pm
+++ b/tp/Texinfo/Convert/IXIN.pm
@@ -607,8 +607,8 @@ sub output_ixin($$)
my %dts_information;
- if ($self->{'parser'}) {
- my $index_names = $self->{'parser'}->indices_information();
+ my $index_names = $self->{'indices_information'};
+ if ($index_names) {
my $merged_index_entries
= Texinfo::Structuring::merge_indices($index_names);
my ($entries, $index_entries_sort_strings)
diff --git a/tp/Texinfo/Convert/Info.pm b/tp/Texinfo/Convert/Info.pm
index 8d971342ec..4888e984fb 100644
--- a/tp/Texinfo/Convert/Info.pm
+++ b/tp/Texinfo/Convert/Info.pm
@@ -563,7 +563,6 @@ sub format_image($$)
1;
__END__
-# $Id: template.pod 6140 2015-02-22 23:34:38Z karl $
# Automatically generated from maintain/template.pod
=head1 NAME
@@ -572,7 +571,7 @@ Texinfo::Convert::Info - Convert Texinfo tree to Info
=head1 SYNOPSIS
- my $converter
+ my $converter
= Texinfo::Convert::Info->converter({'parser' => $parser});
$converter->output($tree);
@@ -589,13 +588,14 @@ Texinfo::Convert::Info converts a Texinfo tree to Info.
=item $converter = Texinfo::Convert::Info->converter($options)
-Initialize converter from Texinfo to Info.
+Initialize converter from Texinfo to Info.
The I<$options> hash reference holds options for the converter. In
-this option hash reference a parser object may be associated with the
+this option hash reference a parser object may be associated with the
I<parser> key. The other options should be configuration options
described in the Texinfo manual. Those options, when appropriate,
-override the document content.
+override the document content. The parser should not be available
+directly anymore after getting the associated information.
See L<Texinfo::Convert::Converter> for more informations.
@@ -606,12 +606,12 @@ described in the Texinfo manual.
=item $result = $converter->convert($tree)
-Convert a Texinfo tree I<$tree> or tree portion and return
+Convert a Texinfo tree I<$tree> or tree portion and return
the resulting output.
=item $result = $converter->convert_tree($tree)
-Convert a Texinfo tree portion I<$tree> and return the resulting
+Convert a Texinfo tree portion I<$tree> and return the resulting
output. This function does not try to output a full document but only
portions. For a full document use C<convert>.
@@ -621,4 +621,13 @@ portions. For a full document use C<convert>.
Patrice Dumas, E<lt>pertusus@free.frE<gt>
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2016 Free Software Foundation, Inc.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
=cut
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index acc4ddf5d2..26546dfbf6 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -804,9 +804,8 @@ sub _prepare_indices($)
{
my $self = shift;
- if ($self->{'parser'}) {
- my $index_names = $self->{'parser'}->indices_information();
- $self->{'index_names'} = $index_names;
+ my $index_names = $self->{'indices_information'};
+ if ($index_names) {
my $merged_index_entries
= Texinfo::Structuring::merge_indices($index_names);
# select non empty indices
@@ -1910,11 +1909,12 @@ sub _index_entry($$)
my $entry = $element->{'extra'}->{'index_entry'};
my $entry_index_name = $entry->{'index_name'};
my $index_name = $entry_index_name;
- if ($self->{'index_names'}->{$entry_index_name}->{'merged_in'}) {
- $index_name = $self->{'index_names'}->{$entry_index_name}->{'merged_in'};
+ if ($self->{'indices_information'}->{$entry_index_name}->{'merged_in'}) {
+ $index_name
+ = $self->{'indices_information'}->{$entry_index_name}->{'merged_in'};
}
my $in_code = 0;
- if ($self->{'index_names'}->{$entry_index_name}->{'in_code'}) {
+ if ($self->{'indices_information'}->{$entry_index_name}->{'in_code'}) {
$in_code = 1;
}
my $options
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 835ebf4dd9..0e34d4a531 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -1207,16 +1207,16 @@ sub process_printindex($$;$)
}
# this is not redone for each index, only once
- if (!defined($self->{'index_entries'}) and $self->{'parser'}) {
+ my $index_names = $self->{'indices_information'};
+ if (!defined($self->{'index_entries'}) and $index_names) {
- my $index_names = $self->{'parser'}->indices_information();
my $merged_index_entries
= Texinfo::Structuring::merge_indices($index_names);
my $index_entries_sort_strings;
($self->{'index_entries'}, $index_entries_sort_strings)
= Texinfo::Structuring::sort_indices($self, $self,
$merged_index_entries);
- $self->{'index_names'} = $index_names;
+ $self->{'indices_information'} = $index_names;
}
if (!$self->{'index_entries'} or !$self->{'index_entries'}->{$index_name}
or ! @{$self->{'index_entries'}->{$index_name}}) {
@@ -3311,7 +3311,6 @@ sub _convert($$)
1;
__END__
-# $Id$
# Automatically generated from maintain/template.pod
=head1 NAME
@@ -3320,7 +3319,7 @@ Texinfo::Convert::Plaintext - Convert Texinfo tree to
Plaintext
=head1 SYNOPSIS
- my $converter
+ my $converter
= Texinfo::Convert::Plaintext->converter({'parser' => $parser});
$converter->output($tree);
@@ -3337,13 +3336,14 @@ Texinfo::Convert::Plaintext converts a Texinfo tree to
Plaintext.
=item $converter = Texinfo::Convert::Plaintext->converter($options)
-Initialize converter from Texinfo to Plaintext.
+Initialize converter from Texinfo to Plaintext.
The I<$options> hash reference holds options for the converter. In
-this option hash reference a parser object may be associated with the
+this option hash reference a parser object may be associated with the
I<parser> key. The other options should be configuration options
described in the Texinfo manual. Those options, when appropriate,
-override the document content.
+override the document content. The parser should not be available
+directly anymore after getting the associated information.
See L<Texinfo::Convert::Converter> for more informations.
@@ -3354,12 +3354,12 @@ described in the Texinfo manual.
=item $result = $converter->convert($tree)
-Convert a Texinfo tree I<$tree> or tree portion and return
+Convert a Texinfo tree I<$tree> or tree portion and return
the resulting output.
=item $result = $converter->convert_tree($tree)
-Convert a Texinfo tree portion I<$tree> and return the resulting
+Convert a Texinfo tree portion I<$tree> and return the resulting
output. This function does not try to output a full document but only
portions. For a full document use C<convert>.
@@ -3369,4 +3369,13 @@ portions. For a full document use C<convert>.
Patrice Dumas, E<lt>pertusus@free.frE<gt>
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2016 Free Software Foundation, Inc.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
=cut
diff --git a/tp/Texinfo/Convert/TexinfoXML.pm b/tp/Texinfo/Convert/TexinfoXML.pm
index aa6889725d..e023e402b7 100644
--- a/tp/Texinfo/Convert/TexinfoXML.pm
+++ b/tp/Texinfo/Convert/TexinfoXML.pm
@@ -418,7 +418,7 @@ sub converter_initialize($)
if $self->{'expanded_formats_hash'}->{$raw};
}
if ($self->{'parser'}) {
- $self->{'index_names'} = $self->{'parser'}->indices_information();
+ $self->{'indices_information'} = $self->{'parser'}->indices_information();
}
}
@@ -495,16 +495,16 @@ sub _index_entry($$)
if (defined($index_entry->{'number'}));
# in case the index is not a default index, or the style of the
# entry (in code or not) is not the default for this index
- if ($self->{'index_names'}) {
+ if ($self->{'indices_information'}) {
my $in_code
- = $self->{'index_names'}->{$index_entry->{'index_name'}}->{'in_code'};
+ =
$self->{'indices_information'}->{$index_entry->{'index_name'}}->{'in_code'};
if (!$Texinfo::Common::index_names{$index_entry->{'index_name'}}
or $in_code !=
$Texinfo::Common::index_names{$index_entry->{'index_name'}}->{'in_code'}) {
push @$attribute, ('incode', $in_code);
}
- if
($self->{'index_names'}->{$index_entry->{'index_name'}}->{'merged_in'}) {
+ if
($self->{'indices_information'}->{$index_entry->{'index_name'}}->{'merged_in'})
{
push @$attribute, ('mergedindex',
-
$self->{'index_names'}->{$index_entry->{'index_name'}}->{'merged_in'});
+
$self->{'indices_information'}->{$index_entry->{'index_name'}}->{'merged_in'});
}
}
my $result = $self->open_element('indexterm', $attribute);
@@ -1717,7 +1717,6 @@ sub _convert($$;$)
1;
__END__
-# $Id: template.pod 6140 2015-02-22 23:34:38Z karl $
# Automatically generated from maintain/template.pod
=head1 NAME
@@ -1726,7 +1725,7 @@ Texinfo::Convert::TexinfoXML - Convert Texinfo tree to
TexinfoXML
=head1 SYNOPSIS
- my $converter
+ my $converter
= Texinfo::Convert::TexinfoXML->converter({'parser' => $parser});
$converter->output($tree);
@@ -1743,13 +1742,14 @@ Texinfo::Convert::TexinfoXML converts a Texinfo tree to
TexinfoXML.
=item $converter = Texinfo::Convert::TexinfoXML->converter($options)
-Initialize converter from Texinfo to TexinfoXML.
+Initialize converter from Texinfo to TexinfoXML.
The I<$options> hash reference holds options for the converter. In
-this option hash reference a parser object may be associated with the
+this option hash reference a parser object may be associated with the
I<parser> key. The other options should be configuration options
described in the Texinfo manual. Those options, when appropriate,
-override the document content.
+override the document content. The parser should not be available
+directly anymore after getting the associated information.
See L<Texinfo::Convert::Converter> for more informations.
@@ -1760,12 +1760,12 @@ described in the Texinfo manual.
=item $result = $converter->convert($tree)
-Convert a Texinfo tree I<$tree> or tree portion and return
+Convert a Texinfo tree I<$tree> or tree portion and return
the resulting output.
=item $result = $converter->convert_tree($tree)
-Convert a Texinfo tree portion I<$tree> and return the resulting
+Convert a Texinfo tree portion I<$tree> and return the resulting
output. This function does not try to output a full document but only
portions. For a full document use C<convert>.
@@ -1775,4 +1775,13 @@ portions. For a full document use C<convert>.
Patrice Dumas, E<lt>pertusus@free.frE<gt>
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2016 Free Software Foundation, Inc.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or (at
+your option) any later version.
+
=cut
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index 1ba049df26..1cc8be6027 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -682,6 +682,7 @@ sub converter($)
if (!$expanded_formats and $converter->{'parser'}->{'EXPANDED_FORMATS'}) {
$expanded_formats = $converter->{'parser'}->{'EXPANDED_FORMATS'};
}
+ delete $converter->{'parser'};
}
if ($expanded_formats) {
foreach my $expanded_format(@$expanded_formats) {
diff --git a/tp/Texinfo/Translations.pm b/tp/Texinfo/Translations.pm
index 2b430ec232..58811e9c1a 100644
--- a/tp/Texinfo/Translations.pm
+++ b/tp/Texinfo/Translations.pm
@@ -209,6 +209,11 @@ sub gdt($$;$$$)
# clickstyle and kbdinputstyle is relevant (though not implemented in thet XS
# parser, but could be) but not necessarily determining. Converters and
# users could easily avoir using @kbd and @click in the translated messages.
+ # FIXME why not use $self->get_conf('clickstyle'), ...? It would not be used
+ # everytime, only if and where the $self object sets 'clickstyle'
+ # and 'kbdinputstyle'
+ # FIXME currently, converters are not associated with parser, such
+ # that the second condition should always be false
# determine existing parser, if any
my $current_parser;
diff --git a/tp/maintain/template.pod b/tp/maintain/template.pod
index 44e71d87b2..601759af22 100644
--- a/tp/maintain/template.pod
+++ b/tp/maintain/template.pod
@@ -30,7 +30,8 @@ The I<$options> hash reference holds options for the
converter. In
this option hash reference a parser object may be associated with the
I<parser> key. The other options should be configuration options
described in the Texinfo manual. Those options, when appropriate,
-override the document content.
+override the document content. The parser should not be available
+directly anymore after getting the associated information.
See L<Texinfo::Convert::Converter> for more informations.
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 78ca5eaab0..67d3f01728 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -1368,9 +1368,12 @@ while(@input_files) {
delete $file_cmdline_options->{'SUBDIR'}
if (exists($file_cmdline_options->{'SUBDIR'}) and get_conf('SPLIT'));
}
+ # the code in Texinfo::Config makes sure that the keys appear only
+ # once in these three hashes.
my $converter_options = { %$main_program_default_options,
+ %$init_files_options,
%$file_cmdline_options,
- %$init_files_options };
+ };
# NOTE nothing set in $main_configuration is passed, which is
# clean, the Converters can find that information their way.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Converter.pm (converter), tp/Texinfo/Convert/Text.pm (converter), tp/Texinfo/Convert/HTML.pm (get_value, _prepare_index_entries), tp/Texinfo/Convert/LaTeX.pm (_prepare_indices), tp/Texinfo/Convert/Plaintext.pm (process_printindex), tp/maintain/template.pod: set 'values' and 'indices_information' from the parser in converter. Do not keep the direct association with the parser.,
Patrice Dumas <=