From: Baldur Kristinsson Date: Tue, 26 Jan 2016 08:46:50 +0000 (+0000) Subject: Avoid 'Use of unitialized value' warning when 'pandoc_math' is not configured X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=158fe327cb46e318a296daa42cf99e911f680222;p=ikiwiki-pandoc.git Avoid 'Use of unitialized value' warning when 'pandoc_math' is not configured --- diff --git a/pandoc.pm b/pandoc.pm index 15f1b6b..e9486be 100755 --- a/pandoc.pm +++ b/pandoc.pm @@ -266,7 +266,7 @@ sub htmlize ($@) { jsmath mathjax latexmathml asciimathml mathml katex mimetex webtex ); my %with_urls = qw/mimetex 1 webtex 1/; - my $mathopt = $1 if $config{pandoc_math} =~ /(\w+)/; + my $mathopt = $1 if $config{pandoc_math} && $config{pandoc_math} =~ /(\w+)/; my $custom_js = $config{pandoc_math_custom_js} || ''; if ($mathopt && $mathconf{$mathopt}) { if ($with_urls{$mathopt} && $custom_js) {