Closed kjhangiani closed 8 years ago
I have a question about multiline stynax: how can I call a component using multiline with as
? I.e. I have something like this:
bs-modal body=false header=false footer=false as |modal|
...
How can I write it using multiline syntax correctly?
bs-modal [
body=false
header=false
footer=false ] as |modal|
Does not work.
I actually posted this on the closed pull request that fixed this, but copying it here as a new issue:
Awesome, thanks for this. One thing I noticed - this seems to be pretty sensitive to tabs vs spaces, not sure if this is intended, but it's a little annoying. Here's an example, using \t and \s for tab and space respectively (extra space after indent sequences for clarity in example)
Doesn't work:
Works:
I prefer to use \t for indenting over \s because then each person can use their preferred editor settings for tab sizes, but now I'm forced to either convert tabs to spaces (which I hate), or remember that to indent inside [ ] syntax I have to use spaces.
It works as long as there is at least 1 space preceding each property, but fails if it's aligned with the = and ], or indented with a tab.
Is there any way this could be addressed? Is the bracket syntax used for any other type of parsing?
It would even be preferable if no indentation was required at all, as then I can just tab it to the same level and align it with the = and the ] bracket, even if it doesn't look nearly as pretty