fix(android): text-transform: capitalize consistency
#9598
+5
−9
Conversation
make it consistent for android and ios fix NativeScript#7059
rigor789
approved these changes
Oct 6, 2021
LGTM, but I think we should land this in 8.2 rather than a patch release given the breaking change in behavior
|
Converted to Draft so we don't accidentally merge before we start the 8.2 merges. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.The text was updated successfully, but these errors were encountered: