From 7b091b8915ad8762f6ba13ab4c183aa89a97eef9 Mon Sep 17 00:00:00 2001 From: Emanuil <4thmail@gmail.com> Date: Thu, 18 Jul 2013 10:07:13 +0300 Subject: [PATCH] link definitions should not tolerate space between `]` and `(` --- Parsedown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parsedown.php b/Parsedown.php index 733a58a..30db1dd 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -557,7 +557,7 @@ class Parsedown # Inline Link / Image - if (strpos($text, ']') !== FALSE and preg_match_all('/(!?)\[(.*?)\][ ]?\((.*?)\)/', $text, $matches, PREG_SET_ORDER)) # inline + if (strpos($text, '](') !== FALSE and preg_match_all('/(!?)\[(.*?)\]\((.*?)\)/', $text, $matches, PREG_SET_ORDER)) # inline { foreach ($matches as $matches) {