diff options
author | Joey Hess <joey@kitenet.net> | 2010-04-21 14:21:40 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-04-21 14:21:40 -0400 |
commit | 0fcbcc4815042531eb58de339844a3767fb5e707 (patch) | |
tree | df6906528d872968429298620a424e2fcf9c39e0 | |
parent | 34e8c78c1c9bf65564c1a3086584158e5c3cc415 (diff) | |
parent | 5c855b2bcab82e4075d49713d53869857a4e9385 (diff) | |
download | ikiwiki-0fcbcc4815042531eb58de339844a3767fb5e707.tar ikiwiki-0fcbcc4815042531eb58de339844a3767fb5e707.tar.gz |
Merge branch 'master' into autotag
-rw-r--r-- | IkiWiki.pm | 18 | ||||
-rw-r--r-- | doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn | 5 |
2 files changed, 15 insertions, 8 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index adae5d8c1..5355b838d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1087,14 +1087,16 @@ sub htmllink ($$$;@) { $bestlink=htmlpage($bestlink); if (! $destsources{$bestlink}) { - return $linktext unless length $config{cgiurl}; - return "<span class=\"createlink\"><a href=\"". - cgiurl( - do => "create", - page => lc($link), - from => $lpage - ). - "\" rel=\"nofollow\">?</a>$linktext</span>" + my $cgilink = ""; + if (length $config{cgiurl}) { + $cgilink = "<a href=\"". + cgiurl( + do => "create", + page => lc($link), + from => $lpage + )."\" rel=\"nofollow\">?</a>"; + } + return "<span class=\"createlink\">$cgilink$linktext</span>" } } diff --git a/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn b/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn new file mode 100644 index 000000000..73213209a --- /dev/null +++ b/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn @@ -0,0 +1,5 @@ +When the CGI URL is not defined, links to missing pages appear as plain, unstyled text. I think the 'createlink' span should always wrap this text, even when the actual question mark linking to the CGI for the create action is missing. This ensures consistent styling regardless of whether the CGI is available or not (and is thus useful for example when the same wiki has clones with the CGI link and clones without). + +A proposed patch is available [on my ikiwiki clone](http://git.oblomov.eu/ikiwiki/patch/290d1b498f00f63e6d41218ddb76d87e68ed5081) + +[[!tag patch cgi done]] |