-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for square brackets #32
Comments
I see. Please give me time to think about this. |
@lloeki amber (https://github.com/eknkc/amber) does square brackets, maybe that would suit you more? |
@matejkramny amber looks interesting. But the square brackets seem mandatory: am I right? Not putting it down, btw. But I'd like to know. @lloeki I've encountered the same problem u have with empty attributes. You dont actually need to specify the
Would be nice to have them be recognized as attributes still without the equal (tough request, yes I know!), but definitely still better than what you're doing now! |
@jf yes correct, square brackets are necessary for attributes. Looking at it now, it may not be optimal since square brackets are valid xml characters. If you need an attribute that needs square brackets, it sort of gets confusing rather quickly. eg: |
With Slim, using CSS-style square brackets is useful to disambiguate between content and empty attributes.
This is extremely useful in some situations such as using web components (e.g with Polymer).
Example in Slim ported from the Polymer tutorial:
This code in Ace currently generates e.g a
container[layout
tag andcenter]
as content.Current, ugly workaround is to use empty equals to force Ace to recognise the attributes as such instead of outputting
layout vertical center
as content:The text was updated successfully, but these errors were encountered: