[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Converter.pm (normalized_sec
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Converter.pm (normalized_sectioning_command_filename), tp/Texinfo/Convert/HTML.pm: rename _sectioning_command_normalized_filename() as normalized_sectioning_command_filename(). |
Date: |
Tue, 07 Sep 2021 18:17:40 -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 6ef0ee0 * tp/Texinfo/Convert/Converter.pm
(normalized_sectioning_command_filename), tp/Texinfo/Convert/HTML.pm: rename
_sectioning_command_normalized_filename() as
normalized_sectioning_command_filename().
6ef0ee0 is described below
commit 6ef0ee0e3db9aa8f3beddc013b4cf08cce680f32
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Sep 8 00:17:27 2021 +0200
* tp/Texinfo/Convert/Converter.pm
(normalized_sectioning_command_filename), tp/Texinfo/Convert/HTML.pm:
rename _sectioning_command_normalized_filename() as
normalized_sectioning_command_filename().
---
ChangeLog | 7 +++++++
tp/Texinfo/Convert/Converter.pm | 40 ++++++++++++++++++++++++----------------
tp/Texinfo/Convert/HTML.pm | 2 +-
3 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 206c1a5..43ccc70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-09-08 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/Converter.pm
+ (normalized_sectioning_command_filename), tp/Texinfo/Convert/HTML.pm:
+ rename _sectioning_command_normalized_filename() as
+ normalized_sectioning_command_filename().
+
2021-09-07 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/Converter.pm (set_informative_command_value),
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 9709f4b..1f5d04d 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -496,7 +496,7 @@ sub _id_to_filename($$)
return substr($id, 0, $self->get_conf('BASEFILENAME_LENGTH'));
}
-sub _sectioning_command_normalized_filename($$)
+sub normalized_sectioning_command_filename($$)
{
my $self = shift;
my $command = shift;
@@ -692,7 +692,7 @@ sub _set_pages_files($$$$$$)
$destination_directory);
} else {
my ($normalized_name, $filename)
- = $self->_sectioning_command_normalized_filename($command);
+ = $self->normalized_sectioning_command_filename($command);
$self->_set_element_file($file_element, $filename,
$destination_directory);
}
@@ -1812,11 +1812,11 @@ the resulting string is returned.
=item ($succeeded, $created_directory) =
$converter->create_destination_directory($destination_directory)
-Create destination directory. I<$succeeded> is true if the creation
-was successful or uneeded, false otherwise. I<$created_directory>
-is the directory actually created, which can be different from
-C<$destination_directory> if C<$destination_directory> already
-exists as a file, output is split and there is an extension.
+Create destination directory. I<$succeeded> is true if the creation was
+successful or uneeded, false otherwise. I<$created_directory> is the directory
+actually created, which is, if possible, I<$destination_directory>, but can
also
+be different from I<$destination_directory> if I<$destination_directory>
+already exists as a file, output is split and there is an extension.
=item ($output_file, $destination_directory, $output_filename, $document_name,
$input_basefile) = $converter->determine_files_and_directory()
@@ -1825,16 +1825,16 @@ result depends on the presence of C<@setfilename>, on
the Texinfo input file
name, and on customization options such as OUTPUT, SUBDIR or SPLIT, as
described
in the Texinfo manual.
-C<$output_file> is mainly relevant when not split and should be used as the
-output file name. In general, if not split and C<$output_file> is an empty
+I<$output_file> is mainly relevant when not split and should be used as the
+output file name. In general, if not split and I<$output_file> is an empty
string, it means that text should be returned by the converter instead of being
written to an output file. This is used in the test suite.
-C<$destination_directory> is either the directory C<$output_file> is in, or if
-split, the directory where the files should be created. C<$output_filename>
+I<$destination_directory> is either the directory C<$output_file> is in, or if
+split, the directory where the files should be created. I<$output_filename>
is, in general, the file name portion of C<$output_file> (without directory)
but can also be set based on C<@setfilename>, in particular when
-C<$output_file> is an empty string. C<$document_name> is C<$output_filename>
-without extension. C<$input_basefile> is based on the input texinfo file name,
+C<$output_file> is an empty string. I<$document_name> is C<$output_filename>
+without extension. I<$input_basefile> is based on the input texinfo file name,
with the file name portion only (without directory).
=item ($caption, $prepended) = $converter->float_name_caption ($float)
@@ -1861,6 +1861,14 @@ format, like the splitting for example.
Returns the value of the Texinfo configuration option I<$option_string>.
+=item ($normalized_name, $filename) =
$converter->normalized_sectioning_command_filename($element)
+
+Returns a normalized name I<$normalized_name> corresponding to a sectioning
+command tree element I<$element>, expanding the command argument using
+transliteration and characters protection. Also returns I<$filename>
+the corresponding filename based on C<$normalized_name> taking into
+account additional constraint on file names and adding a file extension.
+
=item $converter->set_conf($option_string, $value)
Set the Texinfo configuration option I<$option_string> to I<$value> if
@@ -1869,14 +1877,14 @@ not set as a converter option.
=item $converter->set_informative_command_value($element)
Set the Texinfo configuration option corresponding to the tree element
-C<$element>. The command associated to the tree element should be
+I<$element>. The command associated to the tree element should be
a command that sets some information, such as C<@documentlanguage>,
-C<@contents> or <@footnotestyle> for example.
+C<@contents> or C<@footnotestyle> for example.
=item $result = $converter->top_node_filename($document_name)
Returns a file name for the Top node file using either TOP_FILE
-customization value, or EXTENSION customization value and C<$document_name>.
+customization value, or EXTENSION customization value and I<$document_name>.
=back
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 220d337..4295635 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -5510,7 +5510,7 @@ sub _new_sectioning_command_target($$)
my $command = shift;
my ($normalized_name, $filename)
- = $self->_sectioning_command_normalized_filename($command);
+ = $self->normalized_sectioning_command_filename($command);
my $target_base = _normalized_to_id($normalized_name);
if ($target_base !~ /\S/ and $command->{'cmdname'} eq 'top'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Converter.pm (normalized_sectioning_command_filename), tp/Texinfo/Convert/HTML.pm: rename _sectioning_command_normalized_filename() as normalized_sectioning_command_filename().,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/Convert/Converter.pm (set_informative_command_value), tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm: rename _informative_command() as set_informative_command_value().
- Next by Date:
branch master updated: * tp/Texinfo/Convert/Converter.pm (converter), tp/Texinfo/Convert/Text.pm (converter), tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Info.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm: rename converters field 'extra' as 'global_commands' to be more specific and avoid a field that is already used by tree elements.
- Previous by thread:
branch master updated: * tp/Texinfo/Convert/Converter.pm (set_informative_command_value), tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm: rename _informative_command() as set_informative_command_value().
- Next by thread:
branch master updated: * tp/Texinfo/Convert/Converter.pm (converter), tp/Texinfo/Convert/Text.pm (converter), tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/IXIN.pm, tp/Texinfo/Convert/Info.pm, tp/Texinfo/Convert/LaTeX.pm, tp/Texinfo/Convert/Plaintext.pm: rename converters field 'extra' as 'global_commands' to be more specific and avoid a field that is already used by tree elements.
- Index(es):