diff --git a/formatter/src/main/kotlin/org/kotlin/formatter/scanning/DoWhileExpressionScanner.kt b/formatter/src/main/kotlin/org/kotlin/formatter/scanning/DoWhileExpressionScanner.kt index 9d64002..ec0a856 100644 --- a/formatter/src/main/kotlin/org/kotlin/formatter/scanning/DoWhileExpressionScanner.kt +++ b/formatter/src/main/kotlin/org/kotlin/formatter/scanning/DoWhileExpressionScanner.kt @@ -26,7 +26,7 @@ internal class DoWhileExpressionScanner(private val kotlinScanner: KotlinScanner ) } possibleWhitespace() - nodeOfType(KtTokens.WHILE_KEYWORD) thenMapToTokens { listOf(LeafNodeToken(" while(")) } + nodeOfType(KtTokens.WHILE_KEYWORD) thenMapToTokens { listOf(LeafNodeToken(" while (")) } possibleWhitespace() nodeOfType(KtTokens.LPAR) possibleWhitespace() diff --git a/formatter/src/test/kotlin/org/kotlin/formatter/KotlinFormatterTest.kt b/formatter/src/test/kotlin/org/kotlin/formatter/KotlinFormatterTest.kt index 46b92f8..7020e93 100644 --- a/formatter/src/test/kotlin/org/kotlin/formatter/KotlinFormatterTest.kt +++ b/formatter/src/test/kotlin/org/kotlin/formatter/KotlinFormatterTest.kt @@ -3104,7 +3104,7 @@ class KotlinFormatterTest { aMethodWithLambda { do { doSomething() - } while(true) + } while (true) } """.trimIndent() ) @@ -3115,7 +3115,7 @@ class KotlinFormatterTest { aMethodWithLambda { do { doSomething() - } while(true) + } while (true) } """.trimIndent() ) @@ -3129,7 +3129,7 @@ class KotlinFormatterTest { """ do { doSomething() - } while(true) + } while (true) """.trimIndent() ) } @@ -3140,7 +3140,7 @@ class KotlinFormatterTest { """ do { doSomething() - } while(true) + } while (true) """.trimIndent() ) @@ -3148,7 +3148,7 @@ class KotlinFormatterTest { """ do { doSomething() - } while(true) + } while (true) """.trimIndent() ) }