We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa6966c commit 276dea2Copy full SHA for 276dea2
src/main/kotlin/com/lambda/interaction/request/LogContext.kt
@@ -52,8 +52,13 @@ interface LogContext {
52
private var tabs = tabMin
53
54
@LogContextDsl
55
- fun sameLine() =
56
- logContext.replace("\n", "")
+ fun sameLine() {
+ val length = logContext.length
57
+ val first = logContext[length - 2]
58
+ val second = logContext[length - 1]
59
+ if (first != '\\' || second != 'n') throw IllegalStateException("String does not end in a new line")
60
+ logContext = logContext.removeRange(length - 2, length - 1)
61
+ }
62
63
64
fun text(text: String) {
0 commit comments