Commit Graph

2 Commits (82257bc091b7d2ec0d4bfb36e3ea3a9329680cba)

Author SHA1 Message Date
Christopher Chedeau 7f1006056e Indent based on whitespace only for templates (#1714)
I implemented indenting based on any character that's before the `${` but it was not the right behavior. Instead people want to indent based on the indentation of this line. It's easy to fix :)

Fixes parts of #1626
2017-05-24 13:19:34 -07:00
Christopher Chedeau 13f05fb763 Proper indentation for template literals (#1385)
Right now, expressions inside of template literals are have the level of indentation of the start of the template literal. But oftentimes, expressions are nested inside of template literals and therefore the expression should have this level of nesting.

The heuristic i'm using to decide when to use the template literal nesting is if it's not the first line and if there isn't another expression before on the same line.
2017-05-01 14:28:11 -07:00