-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
setIndented(false) also removes new lines from text in views #104
Comments
Well, it seems the way we are providing the
Whereas String block = v.isIndented
? staticHtmlBlock
: stream(staticHtmlBlock.split(lineSeparator())).map(String::trim).collect(joining()); We are wrongly removing all line separators. To fix that we have to remove this code. Also we have to change the way we were building an Is not very complicated and I think it has no impact on performance because all that will be made to run on preprocessing. Moreover I never liked that if/else (i.e ternary) on However this refactoring includes a couple of steps and I need to review all this again. I hope to dedicate some time to it at the end of this week. Thank you, |
Thank you, Miguel, for your efforts 🙏 |
Solved on new release 4.2 |
Similarly to #46, I tried to disable indentation in conjunction with a
<textarea>
element to avoid unwanted whitespace.However, I noticed that
setIndented(false)
for views also removes new lines intext()
blocks. This is problematic, e.g., for<script>
tags. The following test fails, with the rendered view containing no new lines at all:For docs, this seems not to be the case (the test passes):
Is the view behavior a bug or is there another way to preserve the new lines in
text()
blocks?Thank you very much.
The text was updated successfully, but these errors were encountered: