diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-30 16:30:07 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-30 16:30:07 -0400 |
commit | bad5072c02d506b5b5a0d74cd60639f7f62cc7d3 (patch) | |
tree | 92c9e8a86fd2aba9bf7327205d543785a13434c7 /IkiWiki/Plugin | |
parent | 272961d7ff952ba1e1c593c74e6b2b805fa53e77 (diff) |
tag: Avoid autocreating multiple tag pages that vary only in capitalization. The first capitalization seen of a tag will be used for the tag page.
Arguably, the real bug is in the interface to add_autofile, but since
that does take a filename, not a page name, it cannot really do case
handling on its own. The only other users of add_autofile in ikiwiki proper
is autoindex, and it always uses one case. Other third party plugins might
also need to add similar workarounds though.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/tag.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 13dabce0c..ca74fef90 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -104,6 +104,9 @@ sub gentag ($) { else { $tagpage=~s/^\///; } + if (exists $IkiWiki::pagecase{lc $tagpage}) { + $tagpage=$IkiWiki::pagecase{lc $tagpage} + } my $tagfile = newpagefile($tagpage, $config{default_pageext}); |