This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] Fix template string ASI.
ClosedPublic

Authored by mprobst on Oct 17 2016, 6:36 AM.

Details

Summary

Previously, automatic semicolon insertion would add an unwrapped line
when a template string contained a line break.

var x = `foo${
    bar}`;

Would be formatted with bar... on a separate line and no indent.

Diff Detail

Repository
rL LLVM

Event Timeline

mprobst updated this revision to Diff 74837.Oct 17 2016, 6:36 AM
mprobst retitled this revision from to clang-format: [JS] Fix template string ASI..
mprobst updated this object.
mprobst added a reviewer: djasper.
mprobst added a subscriber: cfe-commits.
djasper accepted this revision.Oct 20 2016, 9:25 PM
djasper edited edge metadata.
djasper added inline comments.
unittests/Format/FormatTestJS.cpp
1280 ↗(On Diff #74837)

This doesn't look like it has been formatted with clang-format ..

This revision is now accepted and ready to land.Oct 20 2016, 9:25 PM
mprobst marked an inline comment as done.Oct 20 2016, 10:20 PM
mprobst added inline comments.
unittests/Format/FormatTestJS.cpp
1280 ↗(On Diff #74837)

That is what clang-format does on my machine.

This revision was automatically updated to reflect the committed changes.
mprobst marked an inline comment as done.