]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
fixes
[ikiwiki.git] / IkiWiki.pm
index 4fc37110b95940a1340d721b6a6e93e17813f0d1..b9ae74f854dab240c5e563be920d9947bad48f23 100644 (file)
@@ -18,7 +18,6 @@ use vars qw{%config %links %oldlinks %oldpagemtime %pagectime %pagecase
 sub defaultconfig () { #{{{
        wiki_file_prune_regexp => qr{((^|/).svn/|\.\.|^\.|\/\.|\.x?html?$|\.rss$)},
        wiki_link_regexp => qr/\[\[(?:([^\]\|]+)\|)?([^\s\]]+)\]\]/,
-       wiki_processor_regexp => qr/\[\[(\w+)\s+([^\]]*)\]\]/,
        wiki_file_regexp => qr/(^[-[:alnum:]_.:\/+]+$)/,
        verbose => 0,
        syslog => 0,
@@ -304,14 +303,14 @@ sub cgiurl (@) { #{{{
        return $config{cgiurl}."?".join("&", map "$_=$params{$_}", keys %params);
 } #}}}
 
-sub styleurl (;$) { #{{{
+sub baseurl (;$) { #{{{
        my $page=shift;
 
-       return "$config{url}/style.css" if ! defined $page;
+       return "$config{url}/" if ! defined $page;
        
        $page=~s/[^\/]+$//;
        $page=~s/[^\/]+\//..\//g;
-       return $page."style.css";
+       return $page;
 } #}}}
 
 sub abs2rel ($$) { #{{{
@@ -345,7 +344,8 @@ sub htmllink ($$$;$$$) { #{{{
 
        $linktext=pagetitle(basename($link)) unless defined $linktext;
        
-       return $linktext if length $bestlink && $page eq $bestlink;
+       return "<span class=\"selflink\">$linktext</span>"
+               if length $bestlink && $page eq $bestlink;
        
        # TODO BUG: %renderedfiles may not have it, if the linked to page
        # was also added and isn't yet rendered! Note that this bug is
@@ -475,8 +475,7 @@ sub misctemplate ($$) { #{{{
                indexlink => indexlink(),
                wikiname => $config{wikiname},
                pagebody => $pagebody,
-               styleurl => styleurl(),
-               baseurl => "$config{url}/",
+               baseurl => baseurl(),
        );
        return $template->output;
 }#}}}