Commit 763adac3 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

don't let unrelated lists in the front page confuse us

instead, look for a section named "Table Of Contents".

Task-number: QTCREATORBUG-10585
Change-Id: Ieca51b40387749243a633369119a7d9473ee2325
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent 3bbda25d
......@@ -51,7 +51,7 @@ my %next_define_skips = ();
my %prev_polarity_skips = ();
my %next_polarity_skips = ();
for my $file (@files) {
my ($curpage, $inhdr, $intoc, $inif) = ("", 0, 0, 0);
my ($curpage, $inhdr, $havetoc, $intoc, $inif) = ("", 0, 0, 0, 0);
my ($define_skip, $polarity_skip, $skipping) = ("", 0, 0);
my ($prev_define_skip, $prev_polarity_skip, $prev_skip,
$next_define_skip, $next_polarity_skip, $next_skip) = ("", 0, "", "", 0, "");
......@@ -73,7 +73,9 @@ for my $file (@files) {
$inif = 0;
$skipping = 0;
$define_skip = "";
} elsif (keys(%title2page) == 1 && /^\h*\\list/) {
} elsif (keys(%title2page) == 1 && /^\h*\\section1 Table Of Contents/) {
$havetoc = 1;
} elsif ($havetoc && /^\h*\\list/) {
$intoc++;
} elsif ($intoc) {
if (/^\h*\\endlist/) {
......@@ -111,6 +113,7 @@ for my $file (@files) {
}
} else {
if (/^\h*\\contentspage\b/) {
$havetoc = 0;
$inhdr = 1;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment