Skip to content

fix: iOS nested tags - #274

Merged
szydlovsky merged 1 commit into
mainfrom
@szydlovsky/ios-nested-tags-fix
Nov 21, 2025
Merged

szydlovsky merged 1 commit into
mainfrom
@szydlovsky/ios-nested-tags-fix

Conversation

@szydlovsky

Copy link
Copy Markdown
Collaborator

Summary

Turns out nested tags logic isn't perfect on iOS yet.
Adding a styling like this:
image
(bold and strikethrough, then only strikethrough, then again both of them)
Results in an invalid html:

<html>
<p><b><s>Both</s></b><s>onlystrike<b>both</s></b></p>
</html>

The s tag should have been closed before another b tag and opened again after it.

This PR fixes that situation, making sure all tags that were active index ago and are still active on the index under consideration, if inner to a newly opened tag, will be closed and re-opened.

Test Plan

Try re-creating the text described in the Summary.
See that it produces a valid html now:

<html>
<p><b><s>Both</s></b><s>onlystrike</s><b><s>both</s></b></p>
</html>

Screenshots / Videos

--

Compatibility

OS Implemented
iOS
Android doesn't apply

@szydlovsky
szydlovsky merged commit 67c9cc0 into main Nov 21, 2025
5 checks passed
@szydlovsky
szydlovsky deleted the @szydlovsky/ios-nested-tags-fix branch November 21, 2025 13:49
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.

2 participants