texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert):


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): do not handle menu entry differently from other contents.
Date: Sat, 04 Feb 2023 14:40:23 -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 b7b9985f05 * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): do not 
handle menu entry differently from other contents.
b7b9985f05 is described below

commit b7b9985f05a1267a8b598465256ce9976d0f955f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Feb 4 20:40:07 2023 +0100

    * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): do not handle
    menu entry differently from other contents.
---
 ChangeLog                           |  5 +++++
 tp/Texinfo/Convert/TexinfoMarkup.pm | 33 ++++-----------------------------
 2 files changed, 9 insertions(+), 29 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8e65d3a4eb..68bdff2998 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-02-04  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/TexinfoMarkup.pm (_convert): do not handle
+       menu entry differently from other contents.
+
 2023-02-04  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_close_container),
diff --git a/tp/Texinfo/Convert/TexinfoMarkup.pm 
b/tp/Texinfo/Convert/TexinfoMarkup.pm
index 9d11b97106..d189859bbd 100644
--- a/tp/Texinfo/Convert/TexinfoMarkup.pm
+++ b/tp/Texinfo/Convert/TexinfoMarkup.pm
@@ -1602,37 +1602,12 @@ sub _convert($$;$)
       $result .= "\n";
     }
   }
-  my $arg_nr = -1;
-  if ($element->{'type'} and $element->{'type'} eq 'menu_entry') {
-    foreach my $arg (@{$element->{'contents'}}) {
-      $arg_nr++;
-      my $in_code = 0;
-      if ($arg->{'type'} eq 'menu_entry_node') {
-        $in_code = 1;
-      }
-      push @{$self->{'document_context'}->[-1]->{'monospace'}}, 1
-        if ($in_code);
-      $result .= $self->_convert($arg);
-      pop @{$self->{'document_context'}->[-1]->{'monospace'}}
-        if ($in_code);
-    }
-    # FIXME do not do something specific for menus
-    if ($element->{'type'}) {
-      if (defined($type_elements{$element->{'type'}})) {
-        $result
-          .= 
$self->txi_markup_close_element($type_elements{$element->{'type'}});
-      }
-    }
-    #foreach my $format_element (@close_format_elements) {
-    #  $result .= $self->txi_markup_close_element($format_element);
-    #}
-    return $result;
-  }
   if ($element->{'contents'}) {
     my $in_code;
-    if ($element->{'cmdname'}
-        and 
($Texinfo::Commands::preformatted_code_commands{$element->{'cmdname'}}
-             or $Texinfo::Commands::math_commands{$element->{'cmdname'}})) {
+    if (($element->{'cmdname'}
+         and 
($Texinfo::Commands::preformatted_code_commands{$element->{'cmdname'}}
+              or $Texinfo::Commands::math_commands{$element->{'cmdname'}}))
+         or $element->{'type'} and $element->{'type'} eq 'menu_entry_node') {
       $in_code = 1;
     }
     push @{$self->{'document_context'}->[-1]->{'monospace'}}, 1



reply via email to

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