diff options
author | Tom Willemse | 2024-04-04 14:33:34 -0700 |
---|---|---|
committer | Tom Willemse | 2024-04-04 14:33:34 -0700 |
commit | 5a39466285a85077f19f680071546b14e3a545e4 (patch) | |
tree | d2e0c6aa5c6cde8c7f34621ddf3d203d47d0be23 /nginx-mode.el | |
parent | 6e9d96f58eddd69f62f7fd443d9b9753e16e0e96 (diff) | |
download | nginx-mode-indent-closing-brace-with-comment-fix.tar.gz nginx-mode-indent-closing-brace-with-comment-fix.zip |
Allow anything to follow a closing brace at start of lineindent-closing-brace-with-comment-fix
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.
Diffstat (limited to 'nginx-mode.el')
-rw-r--r-- | nginx-mode.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nginx-mode.el b/nginx-mode.el index b01367c..c612719 100644 --- a/nginx-mode.el +++ b/nginx-mode.el @@ -112,7 +112,7 @@ of the closing brace of a block." (block-indent (nginx-block-indent)) cur-indent) (cond - ((and (looking-at "^\\s-*}\\s-*$") block-indent) + ((and (looking-at "^\\s-*}") block-indent) ;; This line contains a closing brace and we're at the inner ;; block, so we should indent it matching the indentation of ;; the opening brace of the block. |