[clang-format] Support text proto extensions

Authored by krasimir on Mon, Feb 12, 5:18 AM.



This adds support for text proto extensions, like:

msg {
  [type.type/ext] {
    key: value

Diff Detail

rC Clang
krasimir created this revision.Mon, Feb 12, 5:18 AM
djasper added inline comments.Mon, Feb 12, 7:05 AM

It might be useful to attach a test case for what happens if the "[...]" does not fit on one line. I don't even know how I would format that, but it seems important to know and not accidentally modify the behavior.

krasimir updated this revision to Diff 133872.Mon, Feb 12, 8:44 AM
  • Add tests with long [...]
krasimir marked an inline comment as done.Mon, Feb 12, 8:45 AM
krasimir added inline comments.

I added some tests. The current behavior seems reasonable.

krasimir marked an inline comment as done.Mon, Feb 12, 11:33 AM
djasper accepted this revision.Mon, Feb 12, 11:28 PM

Cool, thanks.

This revision is now accepted and ready to land.Mon, Feb 12, 11:28 PM
This revision was automatically updated to reflect the committed changes.