[Rt-commit] rt branch, 4.2/pod-html-UPGRADING-links, created. rt-4.1.23-218-g17bc3ce

Kevin Falcone falcone at bestpractical.com
Tue Oct 1 12:01:00 EDT 2013


The branch, 4.2/pod-html-UPGRADING-links has been created
        at  17bc3ce2cb6477a0087de6bbc951db6aa61d86b2 (commit)

- Log -----------------------------------------------------------------
commit 17bc3ce2cb6477a0087de6bbc951db6aa61d86b2
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Oct 1 11:40:56 2013 -0400

    Make sure we always treat UPGRADING-* files as local links.
    
    Because rt-static-docs is a depth-first search, it can find references
    to UPGRADING-4.2 before it finds UPGRADING-4.2.  This results in a link
    to metacpan.org rather than our upgrading doc.

diff --git a/lib/RT/Pod/HTML.pm b/lib/RT/Pod/HTML.pm
index 540c1f1..adcde1a 100644
--- a/lib/RT/Pod/HTML.pm
+++ b/lib/RT/Pod/HTML.pm
@@ -145,6 +145,12 @@ sub resolve_local_link {
         # We process README separately in devel/tools/rt-static-docs
         $local = $name;
     }
+    elsif ($name =~ /^UPGRADING.*/) {
+        # If an UPGRADING file is referred to anywhere else (such as
+        # templates.pod) we won't have seen UPGRADING yet and will treat
+        # it as a non-local file.
+        $local = $name;
+    }
     # These matches handle links that look like filenames, such as those we
     # parse out of F<> tags.
     elsif (   $name =~ m{^(?:lib/)(RT/[\w/]+?)\.pm$}

-----------------------------------------------------------------------


More information about the Rt-commit mailing list