nginx-intellij-plugin icon indicating copy to clipboard operation
nginx-intellij-plugin copied to clipboard

Code highlighting breaks when using return with text content

Open LsHallo opened this issue 3 years ago • 1 comments

Describe the bug Code highlighting breaks when using return with text content.

To Reproduce Paste this config:

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    location / {
        add_header Content-Type "text/plain";
        return 200 "LB";
    }

    location ~ ^(.*)\.rss {
        resolver 127.0.0.11 ipv6=off;
        rewrite ^ $request_uri break;
        return 400;
        proxy_pass http://nginx_target$uri;
    }
}

Code highlighting breaks after the return 200 "LB" block: image

Expected behavior Code highlighting will continue to work further down in the config file.

IDE (please complete the following information. See Main Menu -> Help -> About):

  • OS: Windows 10 Pro 64bit
  • Product: WebStorm
  • Version: 2021.2.3
  • JRE Version: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • Project SDK: -

Plugin (please complete the following information. See Main Menu -> File -> Settings -> Plugins):

  • Version: 2021.2-212

Additional Information return code [text] is supported: http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return

LsHallo avatar Nov 09 '21 17:11 LsHallo

it isn't the return I believe it's the quotes that cause this; not sure why

d-pollard avatar Jul 07 '22 21:07 d-pollard