element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
Apache License 2.0
3.27k stars 677 forks source link

Normal text extra line space '\n' resolved #8765

Open sufyan-amoodi opened 4 months ago

sufyan-amoodi commented 4 months ago

Type of change

Content

In the "EventHtmlRenderer.kt" file under the "removeLeadingNewlineForInlineElement" function we have added an expression that removes extra line spaces from normal text as well. The solution under the function focuses only on the formatted text lines. After making changes to the same function, we were able to resolve for the normal text lines as well.

Motivation and context

[(https://github.com/element-hq/element-android/issues/8764#issue-2144036397)]

Screenshots / GIFs

Before Screenshot_20240220_125700_Element After Screenshot_20240221_121252_Element - dbg

Tests

Tested devices

Checklist