X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f4a1732b0e65ea4459098e4e852dff10a5af9320..ab768a62c66335a96a5791c444e54b8ae3b078b1:/IkiWiki/Plugin/smiley.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm index 0d77916d0..6f4f49d18 100644 --- a/IkiWiki/Plugin/smiley.pm +++ b/IkiWiki/Plugin/smiley.pm @@ -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;