Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing after the last line space when inheriting the width on more of more than three lines. #187

Open
ycs77 opened this issue Jun 3, 2024 · 0 comments

Comments

@ycs77
Copy link

ycs77 commented Jun 3, 2024

Now termwind can inherit width on two lines like:

termwind/tests/render.php

Lines 213 to 222 in 9c030e6

it('can inherit width on multiple lines', function () {
$html = parse(<<<'HTML'
<div class="w-10">
<div class="w-full bg-red">AAAAAAAAAA</div>
<div class="w-full bg-blue">BBBBBBBBBB</div>
</div>
HTML);
expect($html)->toBe("<bg=red>AAAAAAAAAA</>\n<bg=blue>BBBBBBBBBB</>");
});

But if add more than three lines, it will be missing after the last line space.

This unit test is failed:

$html = parse(<<<'HTML'
    <div class="w-10">
        <div class="w-full bg-red">AAA</div>
        <div class="w-full bg-blue">BBB</div>
        <div class="w-full bg-yellow">CCC</div>
    </div>
HTML);

// this is expected
expect($html)->toBe("<bg=red>AAA       </>\n<bg=blue>BBB       </>\n<bg=yellow>CCC       </>");

// // this is actual
// expect($html)->toBe("<bg=red>AAA       </>\n<bg=blue>BBB       </>\n<bg=yellow>CCC</>");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant