Файл: vendor/laravel/prompts/src/Concerns/Termwind.php
Строк: 33
<?php
namespace LaravelPromptsConcerns;
use LaravelPromptsOutputBufferedConsoleOutput;
use function Termwindrender;
use function TermwindrenderUsing;
trait Termwind
{
protected function termwind(string $html)
{
renderUsing($output = new BufferedConsoleOutput);
render($html);
return $this->restoreEscapeSequences($output->fetch());
}
protected function restoreEscapeSequences(string $string)
{
return preg_replace('/[(d+)m/', "e[".'1m', $string);
}
}