[Rt-commit] rt branch, 4.2/link-docs-from-readme, created. rt-4.2.3-87-gf26bbcd
Alex Vandiver
alexmv at bestpractical.com
Fri Apr 18 16:59:11 EDT 2014
The branch, 4.2/link-docs-from-readme has been created
at f26bbcd68a841cf28f02bfd7acb4e954f1f83b4e (commit)
- Log -----------------------------------------------------------------
commit f26bbcd68a841cf28f02bfd7acb4e954f1f83b4e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Apr 18 16:58:37 2014 -0400
Link docs/foo.pod in README to the appropriate place
Fixes I#21444.
diff --git a/devel/tools/rt-static-docs b/devel/tools/rt-static-docs
index 2c77711..4242bee 100755
--- a/devel/tools/rt-static-docs
+++ b/devel/tools/rt-static-docs
@@ -148,14 +148,17 @@ for my $file (<README* UPGRADING*>) {
open my $source, "<", $file
or warn "Can't open $file: $!", next;
- open my $html, ">", $dest
- or warn "Can't open $dest: $!", next;
+ my $str = "";
+ $str .= encode_entities($_) while <$source>;
+ close $source;
- print $html "<pre>";
- print $html encode_entities($_) while <$source>;
- print $html "</pre>";
+ $str = "<pre>$str</pre>";
+ $str =~ s{\bdocs/([a-z_-]+)\.pod\b}{<a href="$1.html">docs/$1.pod</a>}g;
- close $source; close $html;
+ open my $html, ">", $dest
+ or warn "Can't open $dest: $!", next;
+ print $html $str;
+ close $html;
$converter->note_for_contents_file([$name], $file, $dest);
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list