Trees not working with tab characters
Hello,
I found that using trees with tabs is throwing an error
unmatched dedent (1 for 2) on line 3
This code compiles perfectly fine with spaces:
table1 =
* id: 1
name: 'george'
* id: 2
name: 'mike'
And when using tabs this code throws an error:
table1 =
* id: 1
name: 'george'
* id: 2
name: 'mike'
Yeah, you need to indent it even more :(.
The only way I've gotten it to work w/ tabs is like this:
table1 =
*id: 1
name: 'george'
*id: 2
name: 'mike'
Is this something that could be fixed? Looks like there's an improvement was listed, but is that in the compiler now?
@Saturn2888 I usually do it like this:
table1 =
do
id: 1
name: \george
do
id: 2
name: \mike
And for single item:
table1 =
do
id: 1
name: \george
...
Much better workaround!
Since LiveScript doesn't let you mix tabs and spaces, using tabs strikes me as a pretty bad idea:
table1 =
\t*\ta: b # 3 characters
\t\tb: c # 2 characters
\t\t\tc: d # 3 characters
# Which looks like:
table1 =
* a: b # 3 characters
b: c # 2 characters (this is an error)
c: d # 3 characters
We should probably change star support from being a hack to being an actual thing, but...