-
-
Notifications
You must be signed in to change notification settings - Fork 570
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
term.echo does not respect whitespace #738
Comments
This is expected behavior (at least this is how it was implemented). The whitespace needed to be trimmed from the beginning because the original code when wrapped sometimes had single whitespace that was at the end of the line.
This is was the reason for trimming in the code. What is the use case when you need word wrapping and space in front? |
Released in version 2.32 |
Hi Sorry, I just saw this. The reason for needing this was I have code blocks inside the echo. Which obviously use whitespace as indentation. I see a fix went live, what was it? Thanks and apologies for the delay in the response. |
I'm not sure what you mean by "what was it?" the issue was because in the The fix is that it doesn't remove spaces in front. I just realized that in the original issue I sometimes had one single space in front, I need to check it. |
I was right this introduced a bug https://codepen.io/jcubic/pen/oNoaGyv?editors=0010 there are leading spaces that should not be there. |
Issue summary
When using echo() if you feed in a string on multiple lines when each line has whitespace at the beginning, and you use keepWords the resulting output trims the whitespace from the begginning of each line
Trims whitespace.
Echos normally
It is also worth mentioning that this happens on both echo and less.
Expected behavior
Actual behavior
Ouput
Steps to reproduce
vs
Browser and OS
This does not matter.
The text was updated successfully, but these errors were encountered: