Formatter: support trailing comma in lambda parameters
#KT-34744
This commit is contained in:
@@ -681,5 +681,6 @@ fun getTrailingCommaByClosingElement(closingElement: PsiElement?): PsiElement? {
|
||||
}
|
||||
|
||||
fun getTrailingCommaByElementsList(elementList: PsiElement?): PsiElement? {
|
||||
return elementList?.lastChild?.run { if (node.elementType == KtTokens.COMMA) this else null }
|
||||
val lastChild = elementList?.lastChild?.let { if (it !is PsiComment) it else it.getPrevSiblingIgnoringWhitespaceAndComments() }
|
||||
return lastChild?.run { if (node.elementType == KtTokens.COMMA) this else null }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user