mirror of
https://github.com/danog/telegram-entities.git
synced 2024-11-26 12:14:44 +01:00
Trim text before parsing markdown
This commit is contained in:
parent
2d5c7e9d3e
commit
d70207fdbb
@ -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 = [];
|
||||
|
Loading…
Reference in New Issue
Block a user