Hrrrm, that's actually a really good idea.

Once you just said it, it seems pretty obvious. Inline tags are a
subset of tags that are pretty easy to define.

+1 for how obvious of a solution this is.

Double bonus points for anyone who can dream up a reasonable time when
flattening these would go *wrong*.

Also, anyone for a patch with tests?

-hampton.

PS: This isn't a commitment to the idea. I think about everything a
lot before anything is added to the spec-in-my-head. But, its a
positive first reactions on a beautiful Saturday morning.

On 10/20/07, Inviz <[EMAIL PROTECTED]> wrote:
>
> Hello there.
>
> I love haml, but it has its quirks, and most of them are with inline
> tags. I'd be happy if there was an option to specify inline tags so
> using them wont shift the whitespace, like:
>
> Usual behaviour:
>
> %div
>   %p
>     %strong
>        %span
>           Hello world
>     %img
>
> <div>
>   <p>
>     <strong>
>       <span>
>         Hello world
>       </span>
>     </strong>
>     <img />
>   </p>
> </div>
>
>
> New behaviour (inline_tags set to %w(span strong)):
>
> <div>
>   <p>
>     <strong><span>Hello world</span></strong>
>     <img />
>   </p>
> </div>
>
> The great thing of this is that nesting block tags (p div h2 and such)
> in inline tags is invalid. So you cant put div inside span, so HAML
> shouldnt care about it.
>
> This also solves all %a whitespace problems when %a with content on
> another line definition adds one space at the end of a link in
> browser.
>
> Is there a chance for such option to be introduced?
>
>
> >
>

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