yesodweb/yesodweb.com

Newlines in widgets are preserved

Minoru opened this issue · 2 comments

I mentioned Yesod to one of my web developer friends and one of the first things they said about it was "the minification works somewhat strange". Indeed, the <head> on yesodweb.com is minified, while the rest of the page isn't. I believe this is a rather bad thing, both performance- and reputation-wise.

Confusingly, neither $newlines never nor hamletNewlines = NoNewlines worked, even if I use both simultaneously. I don't understand how that's even possible, but the facts are facts. If someone picks up this issue, you might be interested in looking at no-newlines branch in my fork.

The question is a bit confusing to me, but I think the answer is simple:

  • There's no minification going on
  • The Hamlet renderer is leaving out unnecessary newlines
  • The content from the homepage is being pasted in verbatim from a text file which has newlines

I don't consider any aspect of this a bug.

Sorry for being confusing; you got the question right. (But I still insist that the <head> is minified :)

I don't think I have any strong argument in favour of minification, so I'll leave it at that. Thanks!