Skip to content

Commit 5a39466

Browse files
committed
Allow anything to follow a closing brace at start of line
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.
1 parent 6e9d96f commit 5a39466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nginx-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ of the closing brace of a block."
112112
(block-indent (nginx-block-indent))
113113
cur-indent)
114114
(cond
115-
((and (looking-at "^\\s-*}\\s-*$") block-indent)
115+
((and (looking-at "^\\s-*}") block-indent)
116116
;; This line contains a closing brace and we're at the inner
117117
;; block, so we should indent it matching the indentation of
118118
;; the opening brace of the block.

0 commit comments

Comments
 (0)