mirror of
https://github.com/erusev/parsedown.git
synced 2025-09-02 19:32:35 +02:00
backtick within code span
This commit is contained in:
@@ -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 .= '<code>'.$element_text.'</code>';
|
||||
|
Reference in New Issue
Block a user