Skip to content

Commit

Permalink
fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Sazanov committed Aug 15, 2023
1 parent fc4b6c6 commit 4214148
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function getPlainText(int $length = null)
*/
protected function trimText(string $text, int $length = 140)
{
$text = str_replace(['\r\n', '\r', '\n'], ' ', $text);
$text = str_replace(["\r\n", "\r", "\n"], ' ', $text);
if (strlen($text) > $length) {
$offset = ($length - 3) - strlen($text);
return substr($text, 0, strrpos($text, ' ', $offset)) . '...';
Expand Down

0 comments on commit 4214148

Please sign in to comment.