Remove spaces at end of line before removing multiple new lines (#5928)
(cherry picked from commit 45fad147bfcc10d0fcece135d2196e74bda4a15e)
This commit is contained in:
parent
970967104e
commit
3d5e5da022
@ -481,10 +481,12 @@ class MangaInfoHeaderAdapter(
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateDescription(description: String?, isCurrentlyExpanded: Boolean): CharSequence? {
|
||||
private fun updateDescription(description: String?, isCurrentlyExpanded: Boolean): CharSequence {
|
||||
return when {
|
||||
description.isNullOrBlank() -> view.context.getString(R.string.unknown)
|
||||
isCurrentlyExpanded -> description.replace(Regex("[\\r\\n]{2,}", setOf(RegexOption.MULTILINE)), "\n")
|
||||
isCurrentlyExpanded -> description
|
||||
.replace(Regex(" +\$", setOf(RegexOption.MULTILINE)), "")
|
||||
.replace(Regex("[\\r\\n]{2,}", setOf(RegexOption.MULTILINE)), "\n")
|
||||
else -> description
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user