mirror of
https://github.com/danog/telegram-entities.git
synced 2024-11-26 20:24: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
|
public static function fromMarkdown(string $markdown): self
|
||||||
{
|
{
|
||||||
$markdown = \str_replace("\r\n", "\n", $markdown);
|
$markdown = \trim(\str_replace("\r\n", "\n", $markdown));
|
||||||
$message = '';
|
$message = '';
|
||||||
$messageLen = 0;
|
$messageLen = 0;
|
||||||
$entities = [];
|
$entities = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user