Skip to content

Commit fa2109e

Browse files
authored
fix: parsing empty elements (#284)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect --> # Summary Fixes: #275 Parsing empty elements has been broken, when there was an empty inline tag inside it ## Test Plan - Paste following html as a default value: ```html <html><p>Asd</p><p>Asd</p><p>Asd</p><p><b>Asd</b></p><p><b>Asd</b></p><ul><li><b>asd</b></li><li><b>asd</b></li><li><b>asd</b></li><li><b></b></li></ul><br></html> ``` - Notice that text is parsed properly ## Screenshots / Videos https://github.com/user-attachments/assets/926538e5-2034-40f0-90e4-8ea04994a39b ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ❌ | | Android | ✅ |
1 parent 9b1b4c8 commit fa2109e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

android/src/main/java/com/swmansion/enriched/utils/EnrichedParser.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ public Spanned convert() {
412412
}
413413

414414
private void handleStartTag(String tag, Attributes attributes) {
415-
isEmptyTag = false;
416415
if (tag.equalsIgnoreCase("br")) {
417416
// We don't need to handle this. TagSoup will ensure that there's a </br> for each <br>
418417
// so we can safely emit the linebreaks when we handle the close tag.

0 commit comments

Comments
 (0)