kotlinpoet icon indicating copy to clipboard operation
kotlinpoet copied to clipboard

Add support for linewrapping long strings

Open adrw opened this issue 5 years ago • 0 comments

When defining a Map<String,String> with Kotlin Poet, some of the string values are very long and there isn't a default or way to wrap them at 80 characters in to multiple strings concatenated with + on different lines as an IDE does.

Current functionality

val myMap = mapOf(
  "key1" to "super long text that doesn't wrap, it keeps going and going and going and going and going and going and going and going..."
)

Desired functionality

val myMap = mapOf(
  "key1" to "super long text that doesn't wrap, it keeps going " +
      "and going and going and going and going and going and" +
      " going and going..."
)

adrw avatar Aug 09 '19 14:08 adrw