Skip to content

Commit

Permalink
Merge pull request #439 from FineFindus/fix/lemmy-post-trailing-lines
Browse files Browse the repository at this point in the history
fix(HtmlParser): remove trailing line breaks
  • Loading branch information
LucasGGamerM authored Jun 28, 2024
2 parents e8ce2a7 + 618946a commit ebd6375
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ public SpanInfo(Object span, int start, Element element, boolean more){
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<>();

Expand Down

0 comments on commit ebd6375

Please sign in to comment.