Skip to content

Conversation

@jmschonfeld
Copy link
Contributor

Empty AttributedSubstrings should contain no runs, however there was a small index calculation bug in which empty substrings in the middle of the string (neither at the start or end indices) would incorrectly expand their ranges to the next run. This resolves the bug by ensuring that the Runs.startIndex == Runs.endIndex for all empty substrings regardless of their location in the string.

Resolves rdar://138432081

@jmschonfeld jmschonfeld requested a review from lorentey October 23, 2024 00:01
@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@jmschonfeld jmschonfeld merged commit b49bbc6 into swiftlang:main Nov 1, 2024
3 checks passed
@jmschonfeld jmschonfeld deleted the empty-attrsubstring-runs branch November 1, 2024 17:22
cthielen pushed a commit to cthielen/swift-foundation that referenced this pull request Nov 8, 2024
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