M structurizr-mode.el +1 -1
@@ 76,7 76,7 @@
(let ((block-indentation (structurizr--block-indentation)))
(delete-region (line-beginning-position) (point))
(if block-indentation
- (if (looking-at "[]}]")
+ (if (looking-at "\\}")
(indent-to block-indentation)
(indent-to (+ block-indentation structurizr-indent-level)))
(indent-to (structurizr--previous-indentation)))
M test/test-indentation.el +7 -1
@@ 51,7 51,13 @@ model {
(forward-cursor-on "model")
(call-interactively 'indent-for-tab-command)
- (should (= (current-indentation) 4))))
+ (should (= (current-indentation) 4))
+ (forward-line)
+ (call-interactively 'indent-for-tab-command)
+ (should (= (current-indentation) 4))
+ (forward-line)
+ (call-interactively 'indent-for-tab-command)
+ (should (= (current-indentation) 0))))
(ert-deftest grand-child-indented-twice ()
"A child shown by the {} is indented one level"