robb / Swim

A DSL for writing HTML in Swift
312 stars 9 forks source link

Trim textarea content #35

Closed robb closed 3 years ago

robb commented 3 years ago

As per #33, this automatically trims whitespace around child nodes in textarea, to better match developer intent with browser realities.

textarea {
    """
    Hello
    World
    """
}

used to produce

<textarea>¬
····Hello¬
World¬
<textarea>

and now produces

<textarea>Hello¬
World<textarea>