Trim text before parsing markdown

This commit is contained in:
Daniil Gentili 2024-04-25 15:41:33 +02:00
parent 2d5c7e9d3e
commit d70207fdbb

View File

@ -70,7 +70,7 @@ final class Entities
*/
public static function fromMarkdown(string $markdown): self
{
$markdown = \str_replace("\r\n", "\n", $markdown);
$markdown = \trim(\str_replace("\r\n", "\n", $markdown));
$message = '';
$messageLen = 0;
$entities = [];