From d4f888e35e3c9fc189bfa137f409a07e68e5e7eb Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 18 Apr 2021 13:12:36 +0200 Subject: [PATCH] Document indentation after old-style if, while, for Fixes #12090 --- docs/docs/reference/other-new-features/indentation.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/docs/reference/other-new-features/indentation.md b/docs/docs/reference/other-new-features/indentation.md index 4b1b78a9bf4e..a16f0bbee510 100644 --- a/docs/docs/reference/other-new-features/indentation.md +++ b/docs/docs/reference/other-new-features/indentation.md @@ -68,6 +68,9 @@ There are two rules: if match return then throw try while yield ``` + - after the closing `)` of a condition in an old-style `if` or `while`. + - after the closing `)` or `}` of the enumerations of an old-style `for` loop without a `do`. + If an `` is inserted, the indentation width of the token on the next line is pushed onto `IW`, which makes it the new current indentation width.