Merge pull request #439 from FineFindus/fix/lemmy-post-trailing-lines

fix(HtmlParser): remove trailing line breaks
This commit is contained in:
LucasGGamerM 2024-06-28 09:25:34 -03:00 committed by GitHub
commit ebd637546f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -123,6 +123,9 @@ public class HtmlParser{
int colorInsert=UiUtils.getThemeColor(context, R.attr.colorM3Success);
int colorDelete=UiUtils.getThemeColor(context, R.attr.colorM3Error);
if(source.endsWith("\n"))
source=source.stripTrailing();
Jsoup.parseBodyFragment(source).body().traverse(new NodeVisitor(){
private final ArrayList<SpanInfo> openSpans=new ArrayList<>();