texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp/Texinfo/Convert HTML.pm


From: Patrice Dumas
Subject: texinfo/tp/Texinfo/Convert HTML.pm
Date: Sun, 05 Jun 2011 00:15:52 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/06/05 00:15:52

Modified files:
        tp/Texinfo/Convert: HTML.pm 

Log message:
        if NODE_NAME_IN_MENU, don't pick the associated section if the node is 
        the element command

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.81&r2=1.82

Patches:
Index: HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- HTML.pm     4 Jun 2011 20:35:10 -0000       1.81
+++ HTML.pm     5 Jun 2011 00:15:52 -0000       1.82
@@ -3064,12 +3064,16 @@
   my $node;
   my $section;
   my $node_entry = $command->{'extra'}->{'menu_entry_node'};
+  # external node
   if ($node_entry->{'manual_content'}) {
     $href = $self->command_href($node_entry); 
   } else {
     $node = $self->label_command($node_entry->{'normalized'});
+    # if NODE_NAME_IN_MENU, we pick the associated section, except if 
+    # the node is the element command
     if ($node->{'extra'}->{'associated_section'} 
-      and !$self->get_conf('NODE_NAME_IN_MENU')) {
+      and !$self->get_conf('NODE_NAME_IN_MENU')
+      and !($self->command_element_command($node) eq $node)) {
       $section = $node->{'extra'}->{'associated_section'};
       $href = $self->command_href($section);
     } else {
@@ -3111,12 +3115,16 @@
   my $name;
   my $name_no_number;
   if ($section) {
-    $name = $self->command_text($section, 'text');
-    $name_no_number = $self->convert_tree
-        ({'contents' => $section->{'extra'}->{'misc_content'}});
+    #my $section_name = $self->command_text($section);
+    $name = $self->command_text($section);
+    $name_no_number = $self->command_text($section, 'text_nonumber');
     if ($href ne '') {
+      #$name = "<a href=\"$href\"$accesskey>".$section_name."</a>";
       $name = "<a href=\"$href\"$accesskey>".$name."</a>";
-    }
+    }# else {
+    #  $name = $section_name;
+    #}
+    #$name = "$MENU_SYMBOL ".$name if ($section_name eq $name_no_number);
   }
   if (!defined($name) or $name eq '') {
     if ($command->{'extra'}->{'menu_entry_name'}) {



reply via email to

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