El 13/2/2008, a las 16:56, Kiril Angov escribió:
> Hey guys,
> I was reading all the emails about using tabs vs spaces and I cannot
> stop
> thinking that it is not a big deal if you read the tab from
> the .haml file
> just convert it to 2 spaces and continue the logic. Or before
> processing the
> whole file, replace all beginning tabs with two spaces or three
> spaces or
> whatever. And yes it will add overhead but people who want to use
> tabs will
> at least have an option to do it. Isn't this possible?
Having looked at the code base I don't think this would actually be
all that hard to implement customizable tabs for use in indenting as
an option to the Haml::Engine. Basically just an option like:
:tab => ' '
Would be the default (two spaces), but you could easily override it
with:
:tab => "\t"
Or whatever takes your fancy.
I don't know whether there would be a measurable speed hit, as it
would just be a case of replacing instance of the " " literal String
object with @options[:tab] instead.
That could actually be an alternative to the ":ugly" patch I sent
earlier today too; instead of ":ugly => true" you could just pass
":tab => ''".
The preprocessing proposal sounds like an ugly hack to me.
Cheers,
Wincent "Two-Spaces" Colaiuta
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---