Skip to content

Fix HTML parsing for line breaks within paragraphs#654

Merged
MohamedRejeb merged 1 commit intomainfrom
1.x
Apr 11, 2026
Merged

Fix HTML parsing for line breaks within paragraphs#654
MohamedRejeb merged 1 commit intomainfrom
1.x

Conversation

@MohamedRejeb
Copy link
Copy Markdown
Owner

Fixes: #583

  • Resolved incorrect handling of <br> tags by preserving line breaks within a single <p> instead of creating multiple tags.
  • Introduced isFromLineBreak flag in RichParagraph to identify paragraphs originating from line breaks.
  • Updated HTML encoder and decoder logic to respect isFromLineBreak behavior.
  • Added tests for verifying correct <br> handling in HTML parsing and rendering.

- Resolved incorrect handling of `<br>` tags by preserving line breaks within a single `<p>` instead of creating multiple tags.
- Introduced `isFromLineBreak` flag in `RichParagraph` to identify paragraphs originating from line breaks.
- Updated HTML encoder and decoder logic to respect `isFromLineBreak` behavior.
- Added tests for verifying correct `<br>` handling in HTML parsing and rendering.
@MohamedRejeb MohamedRejeb merged commit 90f842c into main Apr 11, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New line (\n) rendered as empty <p></p> instead of <br> on KMP Android

1 participant