New J2K: Fix wrong line separators on windows

It causes some inspections in post-processing to work not properly
This commit is contained in:
Ilya Kirillov
2019-05-22 00:14:15 +03:00
parent f0012de6ea
commit 9ccedc5bc4
@@ -28,6 +28,7 @@ import org.jetbrains.kotlin.nj2k.tree.visitors.JKVisitorWithCommentsPrinting
import org.jetbrains.kotlin.utils.Printer
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
class NewCodeBuilder(context: NewJ2kConverterContext) {
private val elementInfoStorage = context.elementsInfoStorage
val builder = StringBuilder()
@@ -971,7 +972,7 @@ class NewCodeBuilder(context: NewJ2kConverterContext) {
fun printCodeOut(root: JKTreeElement): String {
Visitor().also { root.accept(it) }
return builder.toString()
return builder.toString().replace("\r\n", "\n")
}
}