Open CodingOctocat opened 1 year ago
Thanks for reporting the issue, I have been able to reproduce it. We have a regular expression that is used to try and capture the preceding brace exception, and I suspect it isn't covering this scenario.
@codecadwallader Here's the solution from chatGPT, I haven't done much testing so just FYI:.
(^[ \t]*(?!//)[^ \t\r\n\{].*(?<!\{)\r?\n)([ \t]*//)(?!//)(?![ \t]*\})
Environment
Description
I enable:
Inserting a space before a single line comment
, For the most part it works fine, but if I use the Kernighan & Ritchie curly bracket style, it produces an unnecessary blank line.Current behavior
Expected behavior