texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/Transformations.pm, Pod-Simple-Texin


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Transformations.pm, Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_reference_to_text_in_texi) : export reference_to_arg_in_tree in Texinfo::Transformations, and use it directly in Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm.
Date: Tue, 08 Feb 2022 06:45: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 d074c06d9a * tp/Texinfo/Transformations.pm, 
Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm (_reference_to_text_in_texi) : 
export reference_to_arg_in_tree in Texinfo::Transformations, and use it 
directly in Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm.
d074c06d9a is described below

commit d074c06d9a55948f47234ce551eedaa965d3c9c2
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Feb 8 12:45:08 2022 +0100

    * tp/Texinfo/Transformations.pm,
    Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
    (_reference_to_text_in_texi) : export reference_to_arg_in_tree
    in Texinfo::Transformations, and use it directly in
    Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm.
---
 ChangeLog                                    | 8 ++++++++
 Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm | 7 ++++---
 tp/Texinfo/Transformations.pm                | 9 +++++++++
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 28f0c08438..9e69096934 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-02-08  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Transformations.pm,
+       Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
+       (_reference_to_text_in_texi) : export reference_to_arg_in_tree
+       in Texinfo::Transformations, and use it directly in
+       Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm.
+
 2022-02-07  Patrice Dumas  <pertusus@free.fr>
 
        * Pod-Simple-Texinfo/pod2texi.pl: allow - as --preamble argument to
diff --git a/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm 
b/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
index 7380a33752..00fbb71a96 100644
--- a/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
+++ b/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
@@ -33,7 +33,8 @@ use Texinfo::Parser qw(parse_texi_line parse_texi_text);
 use Texinfo::Convert::Texinfo;
 use Texinfo::Convert::TextContent;
 use Texinfo::Common qw(protect_comma_in_tree protect_first_parenthesis);
-use Texinfo::Transformations qw(protect_hashchar_at_line_beginning);
+use Texinfo::Transformations qw(protect_hashchar_at_line_beginning
+                                          reference_to_arg_in_tree);
 
 use vars qw(
   @ISA $VERSION
@@ -291,7 +292,7 @@ sub _reference_to_text_in_texi($)
 {
   my $texinfo = shift;
   my $tree = parse_texi_text(undef, $texinfo);
-  Texinfo::Transformations::reference_to_arg_in_tree($tree);
+  reference_to_arg_in_tree($tree);
   return Texinfo::Convert::Texinfo::convert_to_texinfo($tree);
 }
 
@@ -513,7 +514,7 @@ sub _convert_pod($)
             # However, there is a 'man' category here and not in Texinfo,
             # so the information is more precise in pod.
             # NOTE 3: the section within the man (and not the numeric section 
in the
-            # man page specification) whic is in $token->attr('section') is 
ignored.
+            # man page specification) which is in $token->attr('section') is 
ignored.
             # Maybe there would be a way to specify it, but it is not very 
important.
             my $replacement_arg = $token->attr('to').'';
             # regexp from Pod::Simple::HTML resolve_man_page_link
diff --git a/tp/Texinfo/Transformations.pm b/tp/Texinfo/Transformations.pm
index 7ef2cbcff7..50c73a0451 100644
--- a/tp/Texinfo/Transformations.pm
+++ b/tp/Texinfo/Transformations.pm
@@ -38,6 +38,7 @@ use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
 
 %EXPORT_TAGS = ( 'all' => [ qw(
 protect_hashchar_at_line_beginning
+reference_to_arg_in_tree
 ) ] );
 
 @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
@@ -934,6 +935,14 @@ C<get_conf()>.  If both I<$registrar> and 
I<$configuration_information> are
 defined they are used for error reporting in case an hash character could not
 be protected because it appeared in a raw environment.
 
+=item $modified_tree reference_to_arg_in_tree ($tree)
+
+Modify I<$tree> by converting reference @-commands to simple text using one of
+the arguments.  This transformation can be used, for example, to remove
+reference @-command from constructed node names trees, as node names cannot
+contain reference @-command while there could be some in the tree used in input
+for the node name tree.
+
 =item regenerate_master_menu ($translations, $labels)
 
 Regenerate the Top node master menu, replacing the first detailmenu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]