This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] don't break comments before any '{'
ClosedPublic

Authored by mprobst on Aug 3 2018, 1:52 AM.

Details

Summary

Previously, clang-format would avoid breaking before the first {
found, but then happily break before subsequent '{'s on the line. This
change fixes that by looking for the first location that has no opening
curly, if any.

Diff Detail

Repository
rC Clang

Event Timeline

mprobst created this revision.Aug 3 2018, 1:52 AM
mprobst updated this revision to Diff 158946.Aug 3 2018, 1:57 AM

Also handle multiple numbered list tokens.

krasimir accepted this revision.Aug 3 2018, 2:19 AM

Great! Thanks!

This revision is now accepted and ready to land.Aug 3 2018, 2:19 AM
This revision was automatically updated to reflect the committed changes.