mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Remove spaces at end of line before removing multiple new lines (#5928)
This commit is contained in:
		| @@ -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 | ||||
|             } | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user