diff --git a/Parsedown.php b/Parsedown.php index 4856d13..1c93fb3 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -948,9 +948,9 @@ class Parsedown case '`': - if (preg_match('/^`(.+?)`/', $text, $matches)) + if (preg_match('/^(`+)(.+?)\1(?!`)/', $text, $matches)) { - $element_text = $matches[1]; + $element_text = $matches[2]; $element_text = htmlspecialchars($element_text, ENT_NOQUOTES, 'UTF-8'); $markup .= ''.$element_text.'';