mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
resolve #58
This commit is contained in:
@@ -825,9 +825,18 @@ class Parsedown
|
||||
|
||||
case '&':
|
||||
|
||||
$markup .= '&';
|
||||
if (preg_match('/^&#?\w+;/', $text, $matches))
|
||||
{
|
||||
$markup .= $matches[0];
|
||||
|
||||
$offset = substr($text, 0, 5) === '&' ? 5 : 1;
|
||||
$offset = strlen($matches[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$markup .= '&';
|
||||
|
||||
$offset = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user