nunomaduro / termwind

🍃 In short, it's like Tailwind CSS, but for the PHP command-line applications.
MIT License
2.27k stars 76 forks source link

Add parse function #182

Closed myleshyson closed 3 months ago

myleshyson commented 8 months ago

Adds a new parse function that returns the ansi formatted string from some given HTML.

use function Termwind\{parse};

$string = parse(<<<'HTML'
  <div class="bg-white underline uppercase">Hello world</div>
HTML);

// returns "<bg=white>\e[4mHELLO WORLD\e[0m</>"
xiCO2k commented 3 months ago

Already available, thanks @myleshyson.