From debe6cfdb9b26186057230b62725c10782448be7 Mon Sep 17 00:00:00 2001 From: Tim Winters Date: Fri, 15 Dec 2023 17:00:49 -0500 Subject: [PATCH] Support RangeUntil operator --- .../java/com/facebook/ktfmt/format/KotlinInputAstVisitor.kt | 2 +- core/src/test/java/com/facebook/ktfmt/format/FormatterTest.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/facebook/ktfmt/format/KotlinInputAstVisitor.kt b/core/src/main/java/com/facebook/ktfmt/format/KotlinInputAstVisitor.kt index df9021ac..f4ff5555 100644 --- a/core/src/main/java/com/facebook/ktfmt/format/KotlinInputAstVisitor.kt +++ b/core/src/main/java/com/facebook/ktfmt/format/KotlinInputAstVisitor.kt @@ -1230,7 +1230,7 @@ class KotlinInputAstVisitor( val isFirst = leftExpression === leftMostExpression when (leftExpression.operationToken) { - KtTokens.RANGE -> { + KtTokens.RANGE, KtTokens.RANGE_UNTIL -> { if (isFirst) { builder.open(expressionBreakIndent) } diff --git a/core/src/test/java/com/facebook/ktfmt/format/FormatterTest.kt b/core/src/test/java/com/facebook/ktfmt/format/FormatterTest.kt index 082fdddf..40ae6c2e 100644 --- a/core/src/test/java/com/facebook/ktfmt/format/FormatterTest.kt +++ b/core/src/test/java/com/facebook/ktfmt/format/FormatterTest.kt @@ -375,6 +375,7 @@ class FormatterTest { | "The" + | "quick" + | ("brown".."fox") + + | ("brown"..<"fox") + | "jumps" + | "over" + | "the".."lazy" + "dog"