From 66d8157a89b315b3b698affb076ffbb7727da337 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Wed, 27 Dec 2017 06:44:38 -0800 Subject: [PATCH] Markdown.pl: correct .svg extension matching rule The .svg/.svgz matching rule was matching .svz and .svgz by mistake. Move the wayward '?' to the end so it matches .svg and .svgz as originally intended. Signed-off-by: Kyle J. McKay --- Markdown.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Markdown.pl b/Markdown.pl index aa13c36..381d7a1 100755 --- a/Markdown.pl +++ b/Markdown.pl @@ -2202,7 +2202,7 @@ sub _PrefixURL { return $url if $url =~ m,^//, || $url =~ /^[A-Za-z][A-Za-z0-9+.-]*:/; my $ans = $opt{url_prefix}; $ans = $opt{img_prefix} - if $opt{img_prefix} ne '' && $url =~ /\.(?:png|gif|jpe?g|svg?z)$/i; + if $opt{img_prefix} ne '' && $url =~ /\.(?:png|gif|jpe?g|svgz?)$/i; return $url unless $ans ne ''; $ans .= '/' if substr($ans, -1, 1) ne '/'; $ans .= substr($url, 0, 1) eq '/' ? substr($url, 1) : $url;