ikiwiki (3.20130711) unstable; urgency=low
[ikiwiki.git] / doc / todo / Add_camelcase_exclusions.mdwn
1 Camelcase currently looks for any and call camelcase words and turns them into wiki links.  This patch adds a config item called <code>camelcase_ignore</code> which is an array of camelcase words to ignore.
2
3 <pre>
4 --- /usr/share/perl5/IkiWiki/Plugin/camelcase.pm.orig   2008-12-24 11:49:14.000000000 +1300
5 +++ /usr/share/perl5/IkiWiki/Plugin/camelcase.pm        2008-12-24 12:02:21.000000000 +1300
6 @@ -33,7 +33,11 @@
7         my $destpage=$params{destpage};
8  
9         $params{content}=~s{$link_regexp}{
10 -               htmllink($page, $destpage, IkiWiki::linkpage($1))
11 +                if (grep {/$1/} @{ $config{'camelcase_ignore'} }) {
12 +                  $1
13 +                } else {
14 +                 htmllink($page, $destpage, IkiWiki::linkpage($1)) 
15 +                }
16         }eg;
17  
18         return $params{content};
19 </pre>
20
21 --[[puck]]
22
23 [[done]]