fix(android): text-transform: capitalize consistency
#9598
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
PR Checklist
What is the current behavior?
For Android text is split on " " (space) to get an array of words, then each word is lower-cased, then the first character of each word is changed to upper-case. iOS also splits on special characters like hyphen (-).
For example -
Input:
"this is kind-Of-Magic - or a bUG?"Android output:
"This Is Kind-of-magic - Or A Bug?"iOS output:
"This Is Kind-Of-Magic - Or A Bug?"What is the new behavior?
Any non-whitespace character that is preceded by the start of the string, whitespace, or any of these characters
(-"'([{), gets replaced with its uppercase variant.This is now consistent with iOS. Output for the same example
"this is kind-Of-Magic - or a bUG?"is now"This Is Kind-Of-Magic - Or A Bug?"for both Android and iOSFixes/Implements/Closes #7059.
BREAKING CHANGES:
Output for
text-transform: capitalizemight differ for android.