Dose haml try to ensure that every output is pretty formated?

4 views
Skip to first unread message

Steve Wagner

unread,
Jul 14, 2009, 10:47:55 AM7/14/09
to haml...@googlegroups.com
Hi, in NHaml we use the extension methods which gives us the ASP.Net MVC
Framework. This could be something like this:

- using(BeginForm())

which put out a form tag with the current page as action around the
current scope. The problem with this is that this methods only return
strings, so we have no chance to change the indentation or formatting
for this output.

So my question: What is haml's meaning about this? Dose try haml to
ensure pretty formatting on every price?

We have a user request which wants to add a custom BeginForm function
specially for NHaml which could be pretty formatted. But i think that
there is no benefit from doing this.

-Steve

Nathan Weizenbaum

unread,
Jul 14, 2009, 11:52:39 AM7/14/09
to haml...@googlegroups.com
Haml does take certain Rails methods and modify them so that their output is prettier, yes.

Steve Wagner

unread,
Jul 15, 2009, 3:35:33 AM7/15/09
to haml...@googlegroups.com
Ok, but this dose not answer my question. So i redraft my question.

Is it a main goal of haml to output pretty formatted source on every
price? Or is it more like nice to have when its possible?

Nathan Weizenbaum schrieb:

Chris Eppstein

unread,
Jul 15, 2009, 3:48:59 AM7/15/09
to haml...@googlegroups.com
Haml does not attempt to parse strings and reformat them. It does inject itself into ruby-on-rails, but that's a feature that is a luxury of working in ruby, most languages do not tolerate such practices.

chris

Hampton

unread,
Jul 15, 2009, 11:36:30 AM7/15/09
to haml...@googlegroups.com
Personally, I if I can't make sure that the output is pretty, then I flatten the whole damn thing. Put that section on one line.

But, to answer your question, its optional. Its great to work for, and you should try and make pretty output happen, but if its impossible, then its not worth moving mountains or patching .NET.

-hampton.
Reply all
Reply to author
Forward
0 new messages