mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 20:59:15 +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 {
|
return when {
|
||||||
description.isNullOrBlank() -> view.context.getString(R.string.unknown)
|
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
|
else -> description
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user