mirror of
https://github.com/erusev/parsedown.git
synced 2025-01-17 12:48:28 +01:00
backtick within code span
This commit is contained in:
parent
e20c0a29bd
commit
f0fbdaa6ca
@ -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>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user