-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: [PE-737] CGN capitalize text apostrophe case (#6293)
## Short description This PR updates the `capitalize` function to correctly handle words with apostrophes, ensuring that words like _Dall'Ara_ remain _Dall'Ara_ and not _Dall'ara_. ## List of changes proposed in this pull request - Added new test cases to ensure the function works as expected with apostrophes. - Updated the `capitalize` function to correctly handle words with apostrophes. - Used RegExp.exec() to match and preserve leading and trailing spaces. ## How to test 1. Ensure your development environment is set up and the project is running. 2. Run the test suite to verify the changes 3. Check that all tests pass, including the new test cases for words with apostrophes and leading/trailing spaces. Or 1. Modify the CgnOwnershipInformation file with a hardcoded word containing an apostrophe. 2. Verify that the CgnOwnershipInformation component correctly capitalizes words with apostrophes when rendered. ##Preview ![Screenshot 2024-10-17 at 09 41 56](https://github.com/user-attachments/assets/637139cb-5dce-4d57-bd4f-10cd0490ed49) --------- Co-authored-by: Alessandro <[email protected]>
- Loading branch information
1 parent
d15d93f
commit 5552357
Showing
4 changed files
with
82 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters