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

fix: Inline elements should not be trimmed if there is another sibling #80

Closed xiCO2k closed 3 years ago

xiCO2k commented 3 years ago

This PR solves the issue of trimming the text content, and adds a space between the elements if needed, HTML works the same way.

Example:

render(<<<'HTML'
    <div>
        <a class="ml-2">link text</a> and <a href="link">link text</a>
    </div>
HTML);

Before:

link text andlink text

After:

link text and link text