Skip to content

fix: iOS links - #272

Merged
szydlovsky merged 2 commits into
mainfrom
@szydlovsky/links-hotfixes
Nov 20, 2025
Merged

szydlovsky merged 2 commits into
mainfrom
@szydlovsky/links-hotfixes

Conversation

@szydlovsky

Copy link
Copy Markdown
Collaborator

Summary

Firstly, it turns out that something in the internal implementation of attribute:atIndex:longestEffectiveRange:inRange has been changed and if no attribute has been found, longest effective range is set to whole range we are searching in. This resulted in links wrongly returning that their range is whole input and it had implications in fonts and foreground colors randomly breaking when applying links.

Secondly, improved detecting links. The detection made after updating an automatic link didn't take recently emitted link into consideration and ran the event even if the automatic link wasn't updated - resulting in a double emit. The text when applying link was also double emitted because LinkStyle's addLink redundantly called anyTextMayHaveBeenModified

Test Plan

  • To check the first issue, apply a manual link via link editor while having some inline code and blockquotes in the input. See that their styling is stil intact.
  • For the second one just add an automatic link and see no double emitting in console.

Screenshots / Videos

--

Compatibility

OS Implemented
iOS
Android ❌(doesn't apply)

@szydlovsky
szydlovsky requested a review from exploIF November 20, 2025 12:17
@exploIF exploIF changed the title iOS links hotfixes fix: iOS links Nov 20, 2025
@szydlovsky
szydlovsky merged commit 89ca463 into main Nov 20, 2025
5 checks passed
@szydlovsky
szydlovsky deleted the @szydlovsky/links-hotfixes branch November 20, 2025 12:50
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.

3 participants