mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 21:09:20 +01:00
Remove spaces at end of line before removing multiple new lines (#5928)
This commit is contained in:
parent
3664195c71
commit
45fad147bf
@ -365,10 +365,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…
Reference in New Issue
Block a user