[FIR] Prevent duplicate full stop in DEPRECATION messages

This commit is contained in:
Kirill Rakhman
2024-02-05 12:57:06 +01:00
committed by Space Team
parent fc6d25e50f
commit e16f80c578
@@ -205,7 +205,17 @@ object FirDiagnosticRenderers {
}
val OPTIONAL_SENTENCE = Renderer { it: String? ->
if (!it.isNullOrBlank()) " $it." else ""
if (!it.isNullOrBlank()) {
buildString {
append(" ")
append(it.trim())
if (!endsWith(".")) {
append(".")
}
}
} else {
""
}
}
val FOR_OPTIONAL_OPERATOR = Renderer { it: String? ->