Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Jul 30, 2025

This PR fixes an issue with the string utility's replaceUnicode() function that prevented it from processing two adjacent \U{} calls, so replaceUnicode('\U{A0}\U{A0}') would only replace the first \U, not the second. That was due to the requirement of having a non-\ character preceding the \U which blocked it from matching the second \U, as that character can't be part of a previous replacement. That requirement was part of an attempt to avoid escaped backslashes like \\U. But, in addition to the problem it caused for replacing the \U{}, the escaped backslashes were never converted to single backslashes. The new code now properly does that as well.

The tests are adjusted to accommodate the translation of \\ to \, and to add a pair of adjacent \U.

@dpvc dpvc requested a review from zorkow July 30, 2025 17:57
@dpvc dpvc added this to the v4.0 milestone Jul 30, 2025
@codecov
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.71%. Comparing base (e68c42f) to head (ad0ab7e).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1322   +/-   ##
========================================
  Coverage    86.71%   86.71%           
========================================
  Files          337      337           
  Lines        84074    84075    +1     
  Branches      4758     4759    +1     
========================================
+ Hits         72904    72905    +1     
+ Misses       11170    11147   -23     
- Partials         0       23   +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@dpvc dpvc merged commit 70ff585 into develop Aug 1, 2025
3 checks passed
@dpvc dpvc deleted the fix/replaceUnicode branch August 1, 2025 15:19
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