]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/smiley.pm
Merge remote-tracking branch 'smcv/ready/map'
[git.ikiwiki.info.git] / IkiWiki / Plugin / smiley.pm
index 0d77916d0d3d633e7656d79527cce12647089d47..6f4f49d18f4b3fb08d0d73a8ba877987fb12a94d 100644 (file)
@@ -25,7 +25,14 @@ sub getsetup () {
 }
 
 sub build_regexp () {
-       my $list=readfile(srcfile("smileys.mdwn"));
+       my $srcfile = srcfile("smileys.mdwn", 1);
+       if (! defined $srcfile) {
+               print STDERR sprintf(gettext("smiley plugin will not work without %s"),
+                       "smileys.mdwn")."\n";
+               $smiley_regexp='';
+               return;
+       }
+       my $list=readfile($srcfile);
        while ($list =~ m/^\s*\*\s+\\\\([^\s]+)\s+\[\[([^]]+)\]\]/mg) {
                my $smiley=$1;
                my $file=$2;