Skip to content

Commit

Permalink
bugfix/indentation-inside-string-templates(#758)
Browse files Browse the repository at this point in the history
### What's done:
  * Fixed bug
  • Loading branch information
aktsay6 committed Feb 16, 2021
1 parent 8a5ecfc commit b0531b4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ internal class DotCallChecker(config: IndentationConfig) : CustomIndentationChec
type == ELVIS || type == IS_EXPRESSION || type == AS_KEYWORD || type == AS_SAFE
} || nextNode.isCommentBeforeDot()) && whiteSpace.parents.none { it.node.elementType == LONG_STRING_TEMPLATE_ENTRY }
}
?.let {
if (it.isFromStringTemplate()) {
val template = it.parents().takeWhile { it.elementType != STRING_TEMPLATE }.last()
?.let { node ->
if (node.isFromStringTemplate()) {
val template = node.parents().takeWhile { it.elementType != STRING_TEMPLATE }.last()
return CheckResult.from(indentError.actual, indentError.expected +
(if (configuration.extendedIndentBeforeDot) 2 else 1) * configuration.indentationSize, true)
}
Expand Down

0 comments on commit b0531b4

Please sign in to comment.