laravel / prompts

Beautiful and user-friendly forms for your command-line PHP applications.
https://laravel.com/docs/prompts
MIT License
533 stars 94 forks source link

Draw Boxes With All Supported Colors #47

Closed devajmeireles closed 1 year ago

devajmeireles commented 1 year ago

Fixes: #45

Output:

CleanShot 2023-08-09 at 2 04 08

jessarcher commented 1 year ago

Thanks! It would be nice if this supported the rest of the syntax, like foreground colors and other text formatting like bold, italic, etc.

I wonder whether Symfony has any methods we can call to strip the text (e.g. for the non-ANSI output version) or whether we can look at how they're processing the text.

jessarcher commented 1 year ago

I've just updated the regex to handle more Symfony formatting tags (like bold, underscores, etc.) as well as handling tags with multiple options (e.g. <fg=blue;bg=red> and <options=bold,underscore></>).