From 158fe327cb46e318a296daa42cf99e911f680222 Mon Sep 17 00:00:00 2001 From: Baldur Kristinsson Date: Tue, 26 Jan 2016 08:46:50 +0000 Subject: [PATCH] Avoid 'Use of unitialized value' warning when 'pandoc_math' is not configured --- pandoc.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.39.2