jcberquist / commandbox-cfformat

A CommandBox module for formatting CFML component files.
MIT License
22 stars 10 forks source link

Static method calls in array literals are broken by formatter #129

Closed sbleon closed 3 years ago

sbleon commented 3 years ago

Input:

component {

  bleh = [bar::foo()];

}

Output:

component {

  bleh = [bar: : foo()];

}

The extra spaces between and after the colons are bad.

Workaround: surround static call with parens:

component {

  bleh = [(bar::foo())];

}

This may be a problem with the underlying Sublime syntax file, as I've noticed the syntax highlighting changes when I add the parens: Screen Shot 2021-09-21 at 2 16 58 PM vs Screen Shot 2021-09-21 at 2 17 32 PM

This may be related to #128.

jcberquist commented 3 years ago

Thanks for the issues, this and #128 should be fixed in v0.16.7.

sbleon commented 3 years ago

Thanks for the most responsive maintainer ever! You're the best!

On Tue, Sep 21, 2021 at 3:22 PM John Berquist @.***> wrote:

Thanks for the issues, this and #128 https://github.com/jcberquist/commandbox-cfformat/issues/128 should be fixed in v0.16.7.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jcberquist/commandbox-cfformat/issues/129#issuecomment-924312592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQQNZVWYTIOOLQVYR6U7TUDDLNZANCNFSM5EPFOHSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.