nginx-mode icon indicating copy to clipboard operation
nginx-mode copied to clipboard

Allow anything to follow a closing brace at start of line

Open ryuslash opened this issue 1 year ago • 1 comments

Specifically this fixes an indentation issue with this:

if ($host = example.com) {
    return 301 https://$host$request_uri;
} # managed by Certbot

Before this change this would have been indented as:

if ($host = example.com) {
    return 301 https://$host$request_uri;
    } # managed by Certbot

Because the regular expression was looking for a ‘}’ with nothing following it, but comments can follow this construct just fine.

ryuslash avatar Apr 04 '24 22:04 ryuslash

Thank you very much for the fix!

It looks good, though I'm a week away from being able to properly assess this and make a new release, so please hold tight.

ajc avatar Apr 04 '24 23:04 ajc