[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (txi_markup
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (txi_markup_convert_text), tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/TexinfoXML.pm: rename txi_markup_text as txi_markup_convert_text. |
Date: |
Mon, 12 Sep 2022 18:59:03 -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 a04c69364c * tp/Texinfo/Convert/TexinfoMarkup.pm
(txi_markup_convert_text), tp/Texinfo/Convert/TexinfoSXML.pm,
tp/Texinfo/Convert/TexinfoXML.pm: rename txi_markup_text as
txi_markup_convert_text.
a04c69364c is described below
commit a04c69364c1d04b75cc13cdb97bfb2cb0d06f3b1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Sep 13 00:58:50 2022 +0200
* tp/Texinfo/Convert/TexinfoMarkup.pm (txi_markup_convert_text),
tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/TexinfoXML.pm:
rename txi_markup_text as txi_markup_convert_text.
* tp/Texinfo/Convert/TexinfoMarkup.pm (txi_markup_header),
tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/TexinfoXML.pm:
remove the txi_markup_header() arguments.
---
ChangeLog | 10 ++++++++
tp/Texinfo/Convert/TexinfoMarkup.pm | 47 +++++++++++++++++++++++++++++++++----
tp/Texinfo/Convert/TexinfoSXML.pm | 4 ++--
tp/Texinfo/Convert/TexinfoXML.pm | 6 ++---
4 files changed, 56 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 707783f433..50e45d8c62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-09-12 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/TexinfoMarkup.pm (txi_markup_convert_text),
+ tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/TexinfoXML.pm:
+ rename txi_markup_text as txi_markup_convert_text.
+
+ * tp/Texinfo/Convert/TexinfoMarkup.pm (txi_markup_header),
+ tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/TexinfoXML.pm:
+ remove the txi_markup_header() arguments.
+
2022-09-12 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/TexinfoMarkup.pm,
diff --git a/tp/Texinfo/Convert/TexinfoMarkup.pm
b/tp/Texinfo/Convert/TexinfoMarkup.pm
index 903558b5ac..f8662b4cdb 100644
--- a/tp/Texinfo/Convert/TexinfoMarkup.pm
+++ b/tp/Texinfo/Convert/TexinfoMarkup.pm
@@ -299,8 +299,7 @@ sub output($$)
}
my $result = '';
- $result .= $self->write_or_return(
- $self->txi_markup_header($output_file, $output_filename), $fh);
+ $result .= $self->write_or_return($self->txi_markup_header(), $fh);
$result
.= $self->write_or_return($self->txi_markup_open_element('texinfo')."\n",
$fh);
if ($output_file ne '') {
@@ -568,7 +567,7 @@ sub _convert($$;$)
if ($self->{'document_context'}->[-1]->{'raw'}) {
return $element->{'text'};
}
- return $self->txi_markup_text($element);
+ return $self->txi_markup_convert_text($element);
}
my @close_format_elements;
@@ -1633,7 +1632,43 @@ from C<Texinfo::Convert::TexinfoMarkup>:
=over
-=item $text_result = $converter->txi_markup_protect_text($string)
+=item $result = $converter->txi_markup_atom($atom)
+
+Format the I<$atom> symbol string in a simpler way than with an element. For
+example in XML the formatting of the symbol is achieved with an entity.
+
+=item $result = $converter->txi_markup_comment($comment_string)
+
+Format I<$comment_string> as a comment.
+
+=item $result = $converter->txi_markup_convert_text($element)
+
+Called to format the Texinfo tree I<$element> text, which is a
+reference on a hash. The I<$element> text is in the C<text> key.
+The C<type> key value may also be set to distinguish the type of text
+(L<Texinfo::Parser/Types for text elements>).
+Elements are described in details in L<Texinfo::Parser/TEXINFO TREE>.
+
+=item $result = $converter->txi_markup_element($format_element, $attributes)
+
+=item $result = $converter->txi_markup_open_element($format_element,
$attributes)
+
+=item $result = $converter->txi_markup_close_element($format_element,
$attributes)
+
+C<txi_markup_element> is called for the formatting of empty elements that do
+not contain other elements nor text. For other elements,
+C<txi_markup_open_element> is called when an element is opened, and
+C<txi_markup_close_element> is called when an element is closed.
+I<$format_element> is the element name, I<$attributes> is a reference on an
+array containing references on arrays of pairs, one pair for each attribute,
with
+the attribute name as the first item of the pair and the attribute text as the
+second item of the pair.
+
+=item $result = $converter->txi_markup_header()
+
+Called to format a header at the beginning of output files.
+
+=item $result = $converter->txi_markup_protect_text($string)
Protect special character in text for text fragments out of text
texinfo tree elements. For example, for spaces at end of line that
@@ -1644,7 +1679,7 @@ arguments.
=head2 Formatting state information
-Some methods are available for subclasses to gather information on the
+A method is available for subclasses to gather information on the
formatting state:
=over
@@ -1654,6 +1689,8 @@ formatting state:
Return 1 if in a context where spacing should be kept
and C<---> or C<''> left as is, for example in C<@code>, C<@example>.
+=back
+
=head1 AUTHOR
Patrice Dumas, E<lt>pertusus@free.frE<gt>
diff --git a/tp/Texinfo/Convert/TexinfoSXML.pm
b/tp/Texinfo/Convert/TexinfoSXML.pm
index ed7677e2d0..2847cfc578 100644
--- a/tp/Texinfo/Convert/TexinfoSXML.pm
+++ b/tp/Texinfo/Convert/TexinfoSXML.pm
@@ -144,7 +144,7 @@ sub txi_markup_comment($$)
}
# format specific
-sub txi_markup_text($$)
+sub txi_markup_convert_text($$)
{
my $self = shift;
my $element = shift;
@@ -163,7 +163,7 @@ sub txi_markup_text($$)
}
# output format specific
-sub txi_markup_header($$$)
+sub txi_markup_header($)
{
my $self = shift;
my $output_file = shift;
diff --git a/tp/Texinfo/Convert/TexinfoXML.pm b/tp/Texinfo/Convert/TexinfoXML.pm
index d9462468cb..61437a7c06 100644
--- a/tp/Texinfo/Convert/TexinfoXML.pm
+++ b/tp/Texinfo/Convert/TexinfoXML.pm
@@ -183,7 +183,7 @@ sub _protect_text($$)
}
# format specific
-sub txi_markup_text($$)
+sub txi_markup_convert_text($$)
{
my $self = shift;
my $element = shift;
@@ -203,11 +203,9 @@ sub txi_markup_text($$)
}
# output format specific
-sub txi_markup_header($$$)
+sub txi_markup_header($)
{
my $self = shift;
- my $output_file = shift;
- my $output_filename = shift;
my $encoding = '';
if ($self->get_conf('OUTPUT_ENCODING_NAME')
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (txi_markup_convert_text), tp/Texinfo/Convert/TexinfoSXML.pm, tp/Texinfo/Convert/TexinfoXML.pm: rename txi_markup_text as txi_markup_convert_text.,
Patrice Dumas <=