New J2K: Fix formatting saving
This commit is contained in:
committed by
Ilya Kirillov
parent
13a9a56e85
commit
c1ed2e020c
@@ -39,8 +39,9 @@ object ConversionsRunner {
|
||||
+AssignmentStatementSimplifyValConversion()
|
||||
+AssignmentStatementSimplifyAlsoConversion()
|
||||
+AssignmentStatementSplitAlsoConversion()
|
||||
+PolyadicExpressionConversion(context)
|
||||
+PolyadicExpressionConversion()
|
||||
+OperatorExpressionConversion(context)
|
||||
+AddParenthesisForLineBreaksInBinaryExpression()
|
||||
+ThrowStatementConversion()
|
||||
+ArrayInitializerConversion(context)
|
||||
+TryStatementConversion(context)
|
||||
|
||||
@@ -55,7 +55,7 @@ class NewCodeBuilder {
|
||||
private fun List<JKNonCodeElement>.createText(): String {
|
||||
val text = joinToString("") { token -> token.createText() }
|
||||
val needNewLine = text.lastIndexOf('\n') < text.lastIndexOf("//")
|
||||
return text +"\n".takeIf { needNewLine }.orEmpty()
|
||||
return text + "\n".takeIf { needNewLine }.orEmpty()
|
||||
}
|
||||
|
||||
private fun JKNonCodeElementsListOwner.needPreserveSpacesAfterLastCommit() =
|
||||
|
||||
Reference in New Issue
Block a user