blob: 7a6249ae80d4cfb8afc9a885276c8ddbeb2dc176 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
https://savannah.gnu.org/bugs/?62648#comment22
https://bugs.gentoo.org/880623
# HG changeset patch
# User Rik <rik@octave.org>
# Date 1668451079 28800
# Mon Nov 14 10:37:59 2022 -0800
# Node ID 67d5b2d119e254efc3d9f2658de47b293ac1f6eb
# Parent 9f4a9dd4a6ee34ddc6e8d0a87d0c703782af7358
doc: Enable building of Qt documentation with Texinfo >= 7.0 (bug #62648)
* 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.
--- a/doc/interpreter/mk-qthelp.pl
+++ b/doc/interpreter/mk-qthelp.pl
@@ -26,8 +26,11 @@ if ($#ARGV != 1)
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 @@ die "Failed to parse index.html" if ($le
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>)
{
|