Skip to content

Pasting into snippet mangles indentation

What I do

  • In a project, go to Snippets → New
  • Paste the following code for instance (via Ctrl+C because of #13875 (closed)):
server {
        listen       [::]:80;
        listen       0.0.0.0:80;
        server_name  example.com;

        charset utf-8;

        location / {
                return 301 https://$host$request_uri;
        }
}

What I expect

Indentation is preserved.

server {
        listen       [::]:80;
        listen       0.0.0.0:80;
        server_name  example.com;

        charset utf-8;

        location / {
                return 301 https://$host$request_uri;
        }
}

What I get

Indentation is not preserved.

server {
            listen       [::]:80;
                    listen       0.0.0.0:80;
                            server_name  example.com;

                                    charset utf-8;

                                            location / {
                                                                return 301 https://$host$request_uri;
                                            }
}
 
 
                                            }
}

What I use

  • openSUSE Tumbleweed
  • Firefox 87.0 (64-bit)
Edited by Navlost