Fixes for the online docs

This commit is contained in:
Brian Fraser
2013-03-20 13:14:37 -03:00
parent c0b59501f0
commit 5c30f5517e
4 changed files with 40 additions and 28 deletions

View File

@@ -5683,6 +5683,8 @@ use Pod::POM::View::Restructured;
my $input_file = shift @ARGV or die "Need an input file";
my $nofix = scalar @ARGV;
my $tool = basename($input_file);
open my $in_fh, q{<:encoding(UTF-8)}, $input_file
@@ -5716,6 +5718,11 @@ my $section = '';
my $fixed_output = '';
while (my $para = <$in>) {
if ( $nofix ) {
$fixed_output .= $para;
next;
}
next if $para =~ m/^\.\. highlight:: perl/;
$in_code_block = $para =~ m/^\s{2,}/ ? 1 : 0;
@@ -5749,6 +5756,7 @@ while (my $para = <$in>) {
$para =~ s/^[ ]+$//mg;
$para =~ s/^\n\n/\n/mg;
$para =~ s/code-block:: bash(\s+)CREATE/code-block:: sql$1CREATE/sg;
$para =~ s/\*\*:program/** :program/g;
if ( ($section || '') eq 'OUTPUT' ) {
$para =~ s/^([A-Z_]+)\n\n/$1\n/;
}
@@ -5757,8 +5765,13 @@ while (my $para = <$in>) {
}
close $in;
print $header . $fixed_output;
if ($nofix) {
print $fixed_output;
}
else {
print $header . $fixed_output;
}
sub format_links {
if ( my ($label, $url) = split /\|/, $_[0] ) {