Changing the output indentation would require a reasonably large amount of
code and modification to the Haml renderer. It would certainly be doable,
but the question is if the benefit of adding it outweighs the effort, added
complexity, and added feature weight that it would entail. Since the output
indentation is semantically irrelevant and two spaces is generally a
reasonable amount, we haven't felt that the benefit does outweigh the costs.

If you really want this, I'll accept a patch. However, I think the patch
would be reasonably in-depth, and I don't really want to spend the time
writing or re-writing large chunks of it, so read the submission guidelines
carefully and be prepared for a stringent code review if you do send one in.

Even if we do add an option for adjustable output indentation, I would want
it to be entirely independent of input indentation. Inferring it from the
input is too big of a backwards-incompatibility, and too much
behind-the-scenes decision-making.

On Thu, Feb 25, 2010 at 7:03 AM, dreamcat4 <[email protected]> wrote:

> Hi,
>
> I like HAML's 2-space indent for writing the haml code. Its neat and
> tidy. But when generating XML, it can be nice to have bigger tabs, to
> help see whats going on. Is there a way to set the output indent (tab
> size) to 4? Meaning that the generated XML will have a bigger /
> clearer indent?
>
> There seems no appropriate setting in the reference documentation...
> so perhaps its a feature which hasn't been implemented yet?
>
> If the engine.indent == "\t" (detected when haml document is written
> in single tabs): T
> he renderer is emiting 2 spaces "  " in the output and not the
> original "\t".
>
> If the HAML document is writted with an indent of 4 spaces, the
> rendered output also remains 2 spaces regardless.
>
> I think we can easily make the rendering indent equal to the
> engine.indent, by default? And also provide a clear, (publicly
> exposed) option or method to override the outputted rendering indent.
>
>
> dreamcat4
> [email protected]
>
> --
> 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] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>
>

-- 
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.

Reply via email to