Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter doesn't work with certain certbot comments #2

Open
acrogenesis opened this issue Jul 19, 2021 · 2 comments
Open

Formatter doesn't work with certain certbot comments #2

acrogenesis opened this issue Jul 19, 2021 · 2 comments

Comments

@acrogenesis
Copy link

The nginx conf contains the following:

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

  listen 80 ;
  listen [::]:80 ;
  server_name mydomain.com;
  return 404; # managed by Certbot
}

the formatter doesn't identify the closing } on the if. It formats it like the following:

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

    listen 80 ;
    listen [::]:80 ;
    server_name mydomain.com;
    return 404; # managed by Certbot
  }
@r-work
Copy link

r-work commented Oct 10, 2023

Same issue here, that messes up the whole http section

@ahmadalli
Copy link
Owner

This is caused by this: raynigon/vscode-nginx-formatter#207.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants