Skip to content

Commit

Permalink
Draw Boxes With All Supported Colors (#47)
Browse files Browse the repository at this point in the history
* fix draw boxes with all supported colors

* Improve stripping of Symfony formatting

---------

Co-authored-by: Jess Archer <jess@jessarcher.com>
  • Loading branch information
devajmeireles and jessarcher authored Aug 15, 2023
1 parent a109cc5 commit fc58be6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Themes/Default/Concerns/DrawsBoxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ protected function pad(string $text, int $length): string
*/
protected function stripEscapeSequences(string $text): string
{
return preg_replace("/\e[^m]*m/", '', $text);
$text = preg_replace("/\e[^m]*m/", '', $text);

return preg_replace("/<(?:(?:[fb]g|options)=[a-z,;]+)+>(.*?)<\/>/i", '$1', $text);
}
}

0 comments on commit fc58be6

Please sign in to comment.