changeset 31428:ab6d276f6fcb

build: Enable building of Qt documentation with Texinfo >= 7.0 (bug #62648). * doc/interpreter/mk-qthelp.pl: Update regular expressions that find the start of data in index.html and Function-index.html to include additional pattern generated by Texinfo 7.0.
author Rik <rik@octave.org>
date Mon, 14 Nov 2022 10:37:59 -0800
parents 662499ba0d21
children b6dcb53aaa65
files doc/interpreter/mk-qthelp.pl
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/mk-qthelp.pl	Tue Nov 15 12:59:56 2022 +0100
+++ b/doc/interpreter/mk-qthelp.pl	Mon Nov 14 10:37:59 2022 -0800
@@ -26,8 +26,11 @@
 open (my $HTML, "<", $htmlfname) or die "Unable to open $htmlfname";
 
 # Skip through preamble of file to find start of list
-while (($_ = <$HTML>) !~ /^<div class="contents">/ ) {;}
-while (($_ = <$HTML>) !~ /^<ul class="no-bullet">/ ) {;}
+while (defined ($_ = <$HTML>) and ! /^<div class="contents">/ ) {;}
+while (defined ($_ = <$HTML>)
+         and ! /^<ul class="(?:no-bullet|toc-numbered-mark)">/ ) {;}
+
+die "index.html: reached EOF without finding data start pattern" if eof ($HTML);
 
 $level = 0;
 while (<$HTML>)
@@ -68,7 +71,11 @@
 open ($HTML, "<", $htmlfname) or die "Unable to open $htmlfname";
 
 # Skip through preamble of file to find start of list
-while (($_ = <$HTML>) !~ /^<table class="index-fn/ ) {;}
+while (defined ($_ = <$HTML>)
+         and ! /^<table class="(?:index-fn|fn-entries)/ ) {;}
+
+die "Function-Index.html: reached EOF without finding data start pattern"
+  if eof ($HTML);
 
 while (<$HTML>)
 {