1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

improve CommonMark compliance

This commit is contained in:
Emanuil Rusev 2015-01-16 01:44:35 +02:00
parent 79d924040a
commit 05a8f16e95

View File

@ -1232,6 +1232,14 @@ class Parsedown
'extent' => strlen($matches[0]),
);
}
if ($excerpt[1] === '!' and preg_match('/^<!---?[^>-](?:-?[^-])*-->/s', $excerpt, $matches))
{
return array(
'markup' => $matches[0],
'extent' => strlen($matches[0]),
);
}
}
protected function inlineCode($excerpt)