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:
parent
79d924040a
commit
05a8f16e95
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user