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

fix: empty space #2

Merged
merged 1 commit into from
Jul 12, 2023
Merged

fix: empty space #2

merged 1 commit into from
Jul 12, 2023

Conversation

enzonotario
Copy link
Contributor

@enzonotario enzonotario commented Jul 11, 2023

Hi Henry!

I found a small issue here. If the text to render is just an empty space, it is not visualized.

So far, I've found a fix that works well for me in another implementation that I made, just copying chalk-dom and traducing it to Spanish.

Here is the reproduction link:

https://playcode.io/1530673

As you can see, chalk-dom doesn't renderize the blue background, but tiza does renderize the red background. Althought it works well for two spaces.

Thanks!

@henryhale
Copy link
Owner

henryhale commented Jul 12, 2023

Hello Enzo!

Thank you very much for the issue.

I think the main cause of the issue could be within XTerminal.

When XTerminal receives output, the parsing process replaces all consecutive spaces(2) with (  + " ") leaving single spaces as is. This is to enable a smooth responsive body where contents can be wrapped on overflow.

Other than that, I still believe that this fix is pretty good.

Thank you.

@henryhale henryhale merged commit 47e186f into henryhale:master Jul 12, 2023
henryhale pushed a commit that referenced this pull request Jun 6, 2024
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

Successfully merging this pull request may close these issues.

2 participants