texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Structuring.pm (set_menus_node_direc


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Structuring.pm (set_menus_node_directions): use in-tree external menu_entry_node as menu direction.
Date: Wed, 08 Mar 2023 06:11:03 -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 c2d3f23304 * tp/Texinfo/Structuring.pm (set_menus_node_directions): 
use in-tree external menu_entry_node as menu direction.
c2d3f23304 is described below

commit c2d3f2330429c2237881aa62cd16ec2b9eb14881
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Mar 8 12:10:53 2023 +0100

    * tp/Texinfo/Structuring.pm (set_menus_node_directions): use in-tree
    external menu_entry_node as menu direction.
---
 ChangeLog                                                   | 5 +++++
 tp/Texinfo/ParserNonXS.pm                                   | 8 ++++----
 tp/Texinfo/Structuring.pm                                   | 8 ++------
 tp/t/results/html_tests/check_htmlxref.pl                   | 3 ++-
 tp/t/results/html_tests/check_htmlxref_ignore_ref_top_up.pl | 3 ++-
 tp/t/results/html_tests/check_htmlxref_menu.pl              | 3 ++-
 tp/t/results/html_tests/check_htmlxref_no_use_nodes.pl      | 3 ++-
 tp/t/results/html_tests/simple_menu.pl                      | 6 ++++--
 tp/t/results/info_tests/one_node_counted_elements.pl        | 6 ++++--
 tp/t/results/info_tests/space_at_menu_end.pl                | 6 ++++--
 tp/t/results/invalid_nestings/menu_in_style_command.pl      | 6 ++++--
 tp/t/results/menu/block_commands_in_menu_description.pl     | 6 ++++--
 tp/t/results/menu/empty_menu_description.pl                 | 6 ++++--
 tp/t/results/menu/empty_menu_entry_name.pl                  | 6 ++++--
 tp/t/results/menu/example_in_menu_description.pl            | 6 ++++--
 tp/t/results/menu/formats_in_menu.pl                        | 6 ++++--
 tp/t/results/menu/inlineraw_in_menu_description.pl          | 6 ++++--
 tp/t/results/menu/invalid_info_menu_entry.pl                | 6 ++++--
 tp/t/results/menu/multiple_menus.pl                         | 6 ++++--
 tp/t/results/menu/reference_to_external_manual.pl           | 6 ++++--
 tp/t/results/menu/verb_in_menu_description.pl               | 6 ++++--
 tp/t/results/plaintext_tests/line_passed_and_formats.pl     | 6 ++++--
 tp/t/results/sectioning/external_node_in_menu.pl            | 3 ++-
 tp/t/results/sectioning/node_nested_parentheses.pl          | 6 ++++--
 tp/t/results/sectioning/nodename_parentheses.pl             | 3 ++-
 tp/t/results/xml_tests/image_inline_or_not.pl               | 3 ++-
 26 files changed, 89 insertions(+), 49 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 04d3020001..eabea6d3cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-03-07  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Structuring.pm (set_menus_node_directions): use in-tree
+       external menu_entry_node as menu direction.
+
 2023-03-07  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (output_internal_links): determine if
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 2e146083eb..7080882337 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -2917,7 +2917,7 @@ sub _split_def_args
   } elsif (defined $root->{'text'}) {
     my @elements;
     my $type;
-    # FIXME how to handle non ascii space in def*?  As space or argument?
+    # FIXME how to handle non ascii space?  As space or in argument?
     my @split_text = split /(?<=\s)(?=\S)|(?<=\S)(?=\s)/, $root->{'text'};
     if ($split_text[0] =~ /^\s*$/) {
       $type = 'spaces';
@@ -5143,7 +5143,8 @@ sub _handle_line_command($$$$$$)
       = _parse_rawline_command($self, $line, $command, $source_info);
     $command_e->{'info'} = {'arg_line' => $line}
       if ($special_arg);
-    # FIXME add a check on @clickstyle argument at that point?
+    # FIXME add a check that the @clickstyle argument is a glyph command
+    # at that point?
 
     # if using the @set txi* instead of a proper @-command, replace
     # by the tree obtained with the @-command.  Even though
@@ -5957,7 +5958,6 @@ sub _handle_close_brace($$$)
   } elsif ($current->{'type'}
            and $current->{'type'} eq 'rawpreformatted') {
     # empty line can happen in expanded rawpreformatted.
-    # FIXME should it?
     _abort_empty_line($self, $current);
     push @{$current->{'contents'}}, {'text' => '}',
                                      'parent' => $current };
@@ -7170,7 +7170,7 @@ sub _parse_line_command_args($$$)
 
   } elsif ($command eq 'definfoenclose') {
     # REMACRO
-    # FIXME not clear if non ascii spaces are ok in the args
+    # FIXME how to handle non ascii space?  As space or in argument?
     if ($line =~ 
s/^([[:alnum:]][[:alnum:]\-]*)\s*,\s*([^\s,]*)\s*,\s*([^\s,]*)$//) {
       $args = [$1, $2, $3 ];
       my ($cmd_name, $begin, $end) = ($1, $2, $3);
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 88748979d4..aad026a906 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -513,7 +513,6 @@ sub set_menus_node_directions($$$$$$)
           if ($menu_content->{'type'}
               and $menu_content->{'type'} eq 'menu_entry') {
             my $menu_node;
-            my $external_node;
             foreach my $arg (@{$menu_content->{'contents'}}) {
               if ($arg->{'type'} eq 'menu_entry_node') {
                 if ($arg->{'extra'}) {
@@ -535,10 +534,7 @@ sub set_menus_node_directions($$$$$$)
                                     ->{$node->{'extra'}->{'normalized'}} = 1;
                     }
                   } else {
-                    $external_node = 1;
-                    # FIXME use directly arg?
-                    #$menu_node = $arg;
-                    $menu_node = {'extra' => $arg->{'extra'}};
+                    $menu_node = $arg;
                   }
                 }
                 last;
@@ -546,7 +542,7 @@ sub set_menus_node_directions($$$$$$)
             }
             if ($menu_node) {
               if ($previous_node) {
-                if (!$external_node) {
+                if (!$menu_node->{'extra'}->{'manual_content'}) {
                   $menu_node->{'structure'} = {}
                       if (!$menu_node->{'structure'});
                   $menu_node->{'structure'}->{'menu_prev'} = $previous_node;
diff --git a/tp/t/results/html_tests/check_htmlxref.pl 
b/tp/t/results/html_tests/check_htmlxref.pl
index 4a992cb8df..619a222995 100644
--- a/tp/t/results/html_tests/check_htmlxref.pl
+++ b/tp/t/results/html_tests/check_htmlxref.pl
@@ -846,7 +846,8 @@ $result_menus{'check_htmlxref'} = {
                 'text' => 'other_no_existing_no_manual'
               }
             ]
-          }
+          },
+          'type' => 'menu_entry_node'
         },
         'menu_up' => {},
         'menu_up_hash' => {
diff --git a/tp/t/results/html_tests/check_htmlxref_ignore_ref_top_up.pl 
b/tp/t/results/html_tests/check_htmlxref_ignore_ref_top_up.pl
index 346d958caa..e9171b2a00 100644
--- a/tp/t/results/html_tests/check_htmlxref_ignore_ref_top_up.pl
+++ b/tp/t/results/html_tests/check_htmlxref_ignore_ref_top_up.pl
@@ -846,7 +846,8 @@ $result_menus{'check_htmlxref_ignore_ref_top_up'} = {
                 'text' => 'other_no_existing_no_manual'
               }
             ]
-          }
+          },
+          'type' => 'menu_entry_node'
         },
         'menu_up' => {},
         'menu_up_hash' => {
diff --git a/tp/t/results/html_tests/check_htmlxref_menu.pl 
b/tp/t/results/html_tests/check_htmlxref_menu.pl
index 1d3c09e8c5..dd0d9fe5f7 100644
--- a/tp/t/results/html_tests/check_htmlxref_menu.pl
+++ b/tp/t/results/html_tests/check_htmlxref_menu.pl
@@ -846,7 +846,8 @@ $result_menus{'check_htmlxref_menu'} = {
                 'text' => 'other_no_existing_no_manual'
               }
             ]
-          }
+          },
+          'type' => 'menu_entry_node'
         },
         'menu_up' => {},
         'menu_up_hash' => {
diff --git a/tp/t/results/html_tests/check_htmlxref_no_use_nodes.pl 
b/tp/t/results/html_tests/check_htmlxref_no_use_nodes.pl
index 894fd04a0a..b03d9ab33f 100644
--- a/tp/t/results/html_tests/check_htmlxref_no_use_nodes.pl
+++ b/tp/t/results/html_tests/check_htmlxref_no_use_nodes.pl
@@ -846,7 +846,8 @@ $result_menus{'check_htmlxref_no_use_nodes'} = {
                 'text' => 'other_no_existing_no_manual'
               }
             ]
-          }
+          },
+          'type' => 'menu_entry_node'
         },
         'menu_up' => {},
         'menu_up_hash' => {
diff --git a/tp/t/results/html_tests/simple_menu.pl 
b/tp/t/results/html_tests/simple_menu.pl
index 79133c277e..91ddabd5b9 100644
--- a/tp/t/results/html_tests/simple_menu.pl
+++ b/tp/t/results/html_tests/simple_menu.pl
@@ -1635,7 +1635,8 @@ $result_nodes{'simple_menu'} = {
             'text' => 'ggg'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     },
     'node_next' => {}
   }
@@ -1655,7 +1656,8 @@ $result_menus{'simple_menu'} = {
             'text' => 'ggg'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/info_tests/one_node_counted_elements.pl 
b/tp/t/results/info_tests/one_node_counted_elements.pl
index 16ead39507..34f1312348 100644
--- a/tp/t/results/info_tests/one_node_counted_elements.pl
+++ b/tp/t/results/info_tests/one_node_counted_elements.pl
@@ -478,7 +478,8 @@ $result_nodes{'one_node_counted_elements'} = {
             'text' => 'some_manual_name_with_gcc'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     },
     'node_up' => {
       'extra' => {
@@ -506,7 +507,8 @@ $result_menus{'one_node_counted_elements'} = {
             'text' => 'some_manual_name_with_gcc'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/info_tests/space_at_menu_end.pl 
b/tp/t/results/info_tests/space_at_menu_end.pl
index 77e37d56ba..9cec986f52 100644
--- a/tp/t/results/info_tests/space_at_menu_end.pl
+++ b/tp/t/results/info_tests/space_at_menu_end.pl
@@ -223,7 +223,8 @@ $result_nodes{'space_at_menu_end'} = {
             'text' => 'out'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     },
     'node_next' => {}
   }
@@ -243,7 +244,8 @@ $result_menus{'space_at_menu_end'} = {
             'text' => 'out'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/invalid_nestings/menu_in_style_command.pl 
b/tp/t/results/invalid_nestings/menu_in_style_command.pl
index 8bd74e24b7..80b3446167 100644
--- a/tp/t/results/invalid_nestings/menu_in_style_command.pl
+++ b/tp/t/results/invalid_nestings/menu_in_style_command.pl
@@ -214,7 +214,8 @@ $result_nodes{'menu_in_style_command'} = {
             'text' => 'truc'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -232,7 +233,8 @@ $result_menus{'menu_in_style_command'} = {
             'text' => 'truc'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/block_commands_in_menu_description.pl 
b/tp/t/results/menu/block_commands_in_menu_description.pl
index 66414ca72c..f3199632ef 100644
--- a/tp/t/results/menu/block_commands_in_menu_description.pl
+++ b/tp/t/results/menu/block_commands_in_menu_description.pl
@@ -678,7 +678,8 @@ $result_nodes{'block_commands_in_menu_description'} = {
             'text' => 'manual'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -696,7 +697,8 @@ $result_menus{'block_commands_in_menu_description'} = {
             'text' => 'manual'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/empty_menu_description.pl 
b/tp/t/results/menu/empty_menu_description.pl
index 47a5d33fb2..21ff0d036f 100644
--- a/tp/t/results/menu/empty_menu_description.pl
+++ b/tp/t/results/menu/empty_menu_description.pl
@@ -218,7 +218,8 @@ $result_nodes{'empty_menu_description'} = {
           }
         ],
         'normalized' => 'b'
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -237,7 +238,8 @@ $result_menus{'empty_menu_description'} = {
           }
         ],
         'normalized' => 'b'
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/empty_menu_entry_name.pl 
b/tp/t/results/menu/empty_menu_entry_name.pl
index 6412144968..4eddd96443 100644
--- a/tp/t/results/menu/empty_menu_entry_name.pl
+++ b/tp/t/results/menu/empty_menu_entry_name.pl
@@ -291,7 +291,8 @@ $result_nodes{'empty_menu_entry_name'} = {
             'text' => 'vvv'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -309,7 +310,8 @@ $result_menus{'empty_menu_entry_name'} = {
             'text' => 'vvv'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/example_in_menu_description.pl 
b/tp/t/results/menu/example_in_menu_description.pl
index c221e21b3f..47f2493766 100644
--- a/tp/t/results/menu/example_in_menu_description.pl
+++ b/tp/t/results/menu/example_in_menu_description.pl
@@ -347,7 +347,8 @@ $result_nodes{'example_in_menu_description'} = {
             'text' => 'manual'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -365,7 +366,8 @@ $result_menus{'example_in_menu_description'} = {
             'text' => 'manual'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/formats_in_menu.pl 
b/tp/t/results/menu/formats_in_menu.pl
index 5b6558bf75..c104b4ff43 100644
--- a/tp/t/results/menu/formats_in_menu.pl
+++ b/tp/t/results/menu/formats_in_menu.pl
@@ -772,7 +772,8 @@ $result_nodes{'formats_in_menu'} = {
             'text' => 'gcc'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -790,7 +791,8 @@ $result_menus{'formats_in_menu'} = {
             'text' => 'gcc'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/inlineraw_in_menu_description.pl 
b/tp/t/results/menu/inlineraw_in_menu_description.pl
index 98cbb82633..9347249bfb 100644
--- a/tp/t/results/menu/inlineraw_in_menu_description.pl
+++ b/tp/t/results/menu/inlineraw_in_menu_description.pl
@@ -322,7 +322,8 @@ $result_nodes{'inlineraw_in_menu_description'} = {
             'text' => 'manual'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -340,7 +341,8 @@ $result_menus{'inlineraw_in_menu_description'} = {
             'text' => 'manual'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/invalid_info_menu_entry.pl 
b/tp/t/results/menu/invalid_info_menu_entry.pl
index 87c4428c7b..1c2a1d1298 100644
--- a/tp/t/results/menu/invalid_info_menu_entry.pl
+++ b/tp/t/results/menu/invalid_info_menu_entry.pl
@@ -568,7 +568,8 @@ $result_nodes{'invalid_info_menu_entry'} = {
           }
         ],
         'normalized' => 'a_003a'
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -587,7 +588,8 @@ $result_menus{'invalid_info_menu_entry'} = {
           }
         ],
         'normalized' => 'a_003a'
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/multiple_menus.pl 
b/tp/t/results/menu/multiple_menus.pl
index ff90b2e62b..381d6193e7 100644
--- a/tp/t/results/menu/multiple_menus.pl
+++ b/tp/t/results/menu/multiple_menus.pl
@@ -324,7 +324,8 @@ $result_nodes{'multiple_menus'} = {
           }
         ],
         'normalized' => 'b'
-      }
+      },
+      'type' => 'menu_entry_node'
     },
     'node_next' => {}
   }
@@ -345,7 +346,8 @@ $result_menus{'multiple_menus'} = {
           }
         ],
         'normalized' => 'b'
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/reference_to_external_manual.pl 
b/tp/t/results/menu/reference_to_external_manual.pl
index 2fc03ea542..06a38b9234 100644
--- a/tp/t/results/menu/reference_to_external_manual.pl
+++ b/tp/t/results/menu/reference_to_external_manual.pl
@@ -197,7 +197,8 @@ $result_nodes{'reference_to_external_manual'} = {
             'text' => 'info'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -215,7 +216,8 @@ $result_menus{'reference_to_external_manual'} = {
             'text' => 'info'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/menu/verb_in_menu_description.pl 
b/tp/t/results/menu/verb_in_menu_description.pl
index 39f647c437..fd6b972b64 100644
--- a/tp/t/results/menu/verb_in_menu_description.pl
+++ b/tp/t/results/menu/verb_in_menu_description.pl
@@ -306,7 +306,8 @@ $result_nodes{'verb_in_menu_description'} = {
             'text' => 'manual'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -324,7 +325,8 @@ $result_menus{'verb_in_menu_description'} = {
             'text' => 'manual'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/plaintext_tests/line_passed_and_formats.pl 
b/tp/t/results/plaintext_tests/line_passed_and_formats.pl
index 4bb604d958..0751ffa99d 100644
--- a/tp/t/results/plaintext_tests/line_passed_and_formats.pl
+++ b/tp/t/results/plaintext_tests/line_passed_and_formats.pl
@@ -2467,7 +2467,8 @@ $result_nodes{'line_passed_and_formats'} = {
           }
         ],
         'normalized' => 'node'
-      }
+      },
+      'type' => 'menu_entry_node'
     },
     'node_next' => {}
   }
@@ -2488,7 +2489,8 @@ $result_menus{'line_passed_and_formats'} = {
           }
         ],
         'normalized' => 'node'
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/sectioning/external_node_in_menu.pl 
b/tp/t/results/sectioning/external_node_in_menu.pl
index 16525e8794..7dab0935c9 100644
--- a/tp/t/results/sectioning/external_node_in_menu.pl
+++ b/tp/t/results/sectioning/external_node_in_menu.pl
@@ -609,7 +609,8 @@ $result_menus{'external_node_in_menu'} = {
               }
             ],
             'normalized' => 'other'
-          }
+          },
+          'type' => 'menu_entry_node'
         },
         'menu_up' => {},
         'menu_up_hash' => {
diff --git a/tp/t/results/sectioning/node_nested_parentheses.pl 
b/tp/t/results/sectioning/node_nested_parentheses.pl
index d2acccfdbf..f18fb03388 100644
--- a/tp/t/results/sectioning/node_nested_parentheses.pl
+++ b/tp/t/results/sectioning/node_nested_parentheses.pl
@@ -404,7 +404,8 @@ $result_nodes{'node_nested_parentheses'} = {
             'text' => '(some) file'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
@@ -422,7 +423,8 @@ $result_menus{'node_nested_parentheses'} = {
             'text' => '(some) file'
           }
         ]
-      }
+      },
+      'type' => 'menu_entry_node'
     }
   }
 };
diff --git a/tp/t/results/sectioning/nodename_parentheses.pl 
b/tp/t/results/sectioning/nodename_parentheses.pl
index 00213b2179..cf75181d3d 100644
--- a/tp/t/results/sectioning/nodename_parentheses.pl
+++ b/tp/t/results/sectioning/nodename_parentheses.pl
@@ -921,7 +921,8 @@ $result_menus{'nodename_parentheses'} = {
                   }
                 ],
                 'normalized' => 'node'
-              }
+              },
+              'type' => 'menu_entry_node'
             },
             'menu_prev' => {},
             'menu_up' => {},
diff --git a/tp/t/results/xml_tests/image_inline_or_not.pl 
b/tp/t/results/xml_tests/image_inline_or_not.pl
index 387aa3044a..e7010570e0 100644
--- a/tp/t/results/xml_tests/image_inline_or_not.pl
+++ b/tp/t/results/xml_tests/image_inline_or_not.pl
@@ -1646,7 +1646,8 @@ $result_menus{'image_inline_or_not'} = {
               }
             ],
             'normalized' => 'extnode'
-          }
+          },
+          'type' => 'menu_entry_node'
         },
         'menu_up' => {},
         'menu_up_hash' => {



reply via email to

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