Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[resources] Fix regex for placeholders to correctly match multi-digit placeholders. #5187

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

terrakok
Copy link
Member

@terrakok terrakok commented Dec 12, 2024

Updated the regex to correctly match multi-digit placeholders in string templates. Added a suite of tests to ensure replaceWithArgs handles various edge cases like missing arguments, mismatched placeholders, and invalid formats reliably.

Fixes https://youtrack.jetbrains.com/issue/CMP-7236

Testing

  • Unit tests

Release Notes

Fixes - Resources

  • Fix string resource's regex for placeholders to correctly match multi-digit placeholders.

… placeholders.

Updated the regex to correctly match multi-digit placeholders in string templates. Added a suite of tests to ensure `replaceWithArgs` handles various edge cases like missing arguments, mismatched placeholders, and invalid formats reliably.
@terrakok terrakok requested a review from eymar December 12, 2024 14:03
@terrakok terrakok merged commit 6ad5285 into master Dec 12, 2024
@terrakok terrakok deleted the k.tskh/CMP-7236 branch December 12, 2024 14:15
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