diff options
Diffstat (limited to 'doc/src/sgml/generate_history.pl')
-rw-r--r-- | doc/src/sgml/generate_history.pl | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/doc/src/sgml/generate_history.pl b/doc/src/sgml/generate_history.pl index a6c0bd77c23..1d90c676c73 100644 --- a/doc/src/sgml/generate_history.pl +++ b/doc/src/sgml/generate_history.pl @@ -25,34 +25,41 @@ process_file($infile); exit 0; -sub process_file { - my $filename = shift; +sub process_file +{ + my $filename = shift; - local *FILE; # need a local filehandle so we can recurse + local *FILE; # need a local filehandle so we can recurse - my $f = $srcdir . '/' . $filename; - open(FILE, $f) || die "could not read $f: $!\n"; + my $f = $srcdir . '/' . $filename; + open(FILE, $f) || die "could not read $f: $!\n"; - while (<FILE>) { - # Recursively expand sub-files of the release notes - if (m/^&(release-.*);$/) { - process_file($1 . ".sgml"); - next; - } + while (<FILE>) + { - # Remove <link ...> tags, which might span multiple lines - while (m/<link/) { - if (s/<link\s+linkend[^>]*>//) { - next; - } - # incomplete tag, so slurp another line - $_ .= <FILE>; - } + # Recursively expand sub-files of the release notes + if (m/^&(release-.*);$/) + { + process_file($1 . ".sgml"); + next; + } + + # Remove <link ...> tags, which might span multiple lines + while (m/<link/) + { + if (s/<link\s+linkend[^>]*>//) + { + next; + } - # Remove </link> too - s|</link>||g; + # incomplete tag, so slurp another line + $_ .= <FILE>; + } - print; - } - close(FILE); + # Remove </link> too + s|</link>||g; + + print; + } + close(FILE); } |