You're right, this isn't the right behavior. A patch would definitely be appreciated.
Multiline selectors work by parsing each individual line into its own RuleNode. Then each of these nodes are rendered in http://github.com/evilchelu/haml/tree/master/lib/sass/tree/node.rb#L25-27 A more robust way to do this might be to realize that a multiline selector node has been reached in Engine#build_tree, and combine its rule with the next node. You may also need to modify RuleNode#to_s to preserve the newline. I hope this is helpful! - Nathan Cristi BALAN wrote: > Hi, > > I'm trying to use multiline selectors on multiple lines and the > generated output is not what I was expecting. It seems that haml > forgets about all but the last rule when using multiline grouped > selectors. Here's a pastie with an example: > > http://pastie.caboo.se/170174 > > I'm interested in providing a patch, but I'd like to know if it's > possible and maybe get a few clues. At the moment I'm looking around > this but not sure what's going on exactly: > > http://github.com/evilchelu/haml/tree/master/lib/sass/tree/rule_node.rb#L23-37 > > Anyway, for now, I forked haml and added some failing tests for this: > > http://github.com/evilchelu/haml > > Cristi > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
