nunomaduro / termwind

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

Feature: parse html using a `render` function #35

Closed nunomaduro closed 3 years ago

nunomaduro commented 3 years ago

At this point, we already have an HTML-like API where you can do stuff like so:

use function Termwind\{div};

div('Hello World', 'ml-2')->render(); // renders "  Hello World" on the console

The goal of this issue to create a new function with the name render that accepts an HTML string and renders the console output like so:

use function Termwind\{render};

render('<div class="m-2">Hello World</div>'); // renders "  Hello World" on the console