1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00
This commit is contained in:
Emanuil Rusev
2014-01-19 00:52:07 +02:00
parent 1017f22cdd
commit f5dd3455f9
5 changed files with 13 additions and 5 deletions

View File

@@ -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;