split element properties in multiple lines

6 views
Skip to first unread message

Rodrigo Rosenfeld Rosas

unread,
Jun 25, 2012, 1:55:07 PM6/25/12
to seren...@googlegroups.com
Is it possible to continue a view state in the next line like ending an line with "\" in Ruby and CoffeeScript?

I need to write some views like:

button[event:click=@addCondition class="condition-button add-child" title="Add filter"] "Add filter"

But I'd prefer to write it as

button[ \
    event:click=@addCondition \
    class="condition-button add-child" \
    title="Add filter" \
  ] "Add filter"

Or even omit the "\" if possible since the bracket wasn't closed yet.

Make sense?

Jonas Nicklas

unread,
Jun 25, 2012, 2:28:31 PM6/25/12
to seren...@googlegroups.com
I think this should be doable in the parser/lexer, I think. It might
be somewhat tricky considering indentation and so on. I don't think
the backslash would make any difference wih how easy/hard this is to
parse.

/Jonas
Reply all
Reply to author
Forward
0 new messages