[web-devel] [hamlet] implicit spaces with newlines?

Greg Weber greg at gregweber.info
Thu May 19 23:08:24 CEST 2011

I am wondering if the default behavior should be changed in hamlet, because
I find the white space issues a bit annoying myself. You end up with issues
either way, but in Hamlet we have made html the default, so maybe white
space behavior should be more closely aligned.

Yes, you need to append a space. You can follow the space with a '#' to let
everyone know there is a space there. This is documented in the book:

Greg Weber

On Thu, May 19, 2011 at 1:49 PM, Patrick Palka <patrick at parcs.ath.cx> wrote:

> I find it a bit unintuitive that the hamlet code
> <p>hello
>    <strong>there
> or
> <p>
>     hello
>     <strong>there
> generates the html
> <p>hello<strong>there</strong></p>
> I expected there to be a space between "hello" and "there" similar to what
> the html specifications dictate. Is this behavior intentional or an
> oversight? If it's the former, then what is the recommended way to simulate
> my expected behavior? Appending a space to the end of a line is
> mentally ugly and syntactically obscure.
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110519/376a7c01/attachment.htm>

More information about the web-devel mailing list