From bad5072c02d506b5b5a0d74cd60639f7f62cc7d3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 30 Apr 2011 16:30:07 -0400 Subject: 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. --- IkiWiki/Plugin/tag.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'IkiWiki') 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}); -- cgit v1.2.3