Closed khanlou closed 3 years ago
(This issue got lost in my inbox somehow, apologies)
Just to double check, the whitespace you are talking about is the one highlighted with ¬
and ·
here:
textarea {
"""
Hello
World
"""
}
<textarea>¬
····Hello
World¬
<textarea>
if that's the case, it should be enough to give the textarea
definition a trim whitespace
attribute similar to textLevelSemantics
.
In the short term, you can wrap your contents with a trim operator:
textarea {
%"""
Hello
World
"""%
}
which should give you
<textarea>Hello
World<textarea>
Oh, this is perfect. This unlocked it for me:
textarea(cols: "30", name: "notes", rows: "4") {
Node.trim
item.notes
Node.trim
}
Should be better in main
.
Looks wonderful, thank you!
By default, the
textarea
tag uses all the whitespace inside of it and uses that for the value of the textarea. Since Swim's default approach for rendering an html tree to a string is to pretty print it with tons of whitespace (which in general is great!), this adds a bunch of whitespace in any textarea.I'm not sure what the best way to fix this is: