]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
indentation
authorJoey Hess <joey@kitenet.net>
Tue, 16 Nov 2010 19:40:16 +0000 (15:40 -0400)
committerJoey Hess <joey@kitenet.net>
Tue, 16 Nov 2010 19:40:16 +0000 (15:40 -0400)
IkiWiki/Plugin/inline.pm

index c00aed299c8fa2cd27508f2ded85a9f000da7930..3b98bf8dd67b116fa9524043dbdb1eb269f9af95 100644 (file)
@@ -104,7 +104,7 @@ sub checkconfig () {
 }
 
 sub format (@) {
-        my %params=@_;
+       my %params=@_;
 
        # Fill in the inline content generated earlier. This is actually an
        # optimisation.
@@ -513,16 +513,16 @@ sub absolute_urls ($$) {
        my $url=$baseurl;
        $url=~s/[^\/]+$//;
 
-        # what is the non path part of the url?
-        my $top_uri = URI->new($url);
-        $top_uri->path_query(""); # reset the path
-        my $urltop = $top_uri->as_string;
+       # what is the non path part of the url?
+       my $top_uri = URI->new($url);
+       $top_uri->path_query(""); # reset the path
+       my $urltop = $top_uri->as_string;
 
        $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(#[^"]+)"/$1 href="$baseurl$2"/mig;
-        # relative to another wiki page
+       # relative to another wiki page
        $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(?!\w+:)([^\/][^"]*)"/$1 href="$url$2"/mig;
        $content=~s/(<img(?:\s+(?:class|id|width|height)\s*="?\w+"?)*)\s+src=\s*"(?!\w+:)([^\/][^"]*)"/$1 src="$url$2"/mig;
-        # relative to the top of the site
+       # relative to the top of the site
        $content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(?!\w+:)(\/[^"]*)"/$1 href="$urltop$2"/mig;
        $content=~s/(<img(?:\s+(?:class|id|width|height)\s*="?\w+"?)*)\s+src=\s*"(?!\w+:)(\/[^"]*)"/$1 src="$urltop$2"/mig;
        return $content;