[PATCH] clang-format: [js] Support template strings.
martinprobst at google.com
Fri Feb 20 04:44:01 PST 2015
Comment at: lib/Format/Format.cpp:798
@@ +797,3 @@
+ IsMultiline || I->NewlinesBefore > 0 || I->IsMultiline;
+ if (I->isNot(tok::unknown) || I->TokenText != "`")
> mprobst wrote:
> > djasper wrote:
> > > Can you add a test with two template strings? I think that might do the wrong thing as you need to abort when you find a TT_TemplateString.
> > It's not strictly needed - if there was a preceding template string, it cannot just equals "`", it must have at least opener and closer "``". But it's a reasonable optimization and IMHO adds clarity.
> I agree. Still seems useful to have a test ;-).
Sorry for being unclear, I actually did add one.
More information about the cfe-commits