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

fix: fix #137 #140

Merged
merged 1 commit into from
Sep 25, 2023
Merged

fix: fix #137 #140

merged 1 commit into from
Sep 25, 2023

Conversation

motss
Copy link
Owner

@motss motss commented Sep 25, 2023

Description

Fixes #137.

Changes

  1. Add { letter: 'ss', diacritics: /\u00DF/g },
  2. Update tests

Signed-off-by: Rong Sen Ng (motss) <[email protected]>
@motss motss added the bug label Sep 25, 2023
@motss motss self-assigned this Sep 25, 2023
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #140 (9d4f8d5) into main (5f96d66) will not change coverage.
Report is 11 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #140   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          152       152           
  Branches         5         5           
=========================================
  Hits           152       152           
Flag Coverage Δ
unit_tests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/diacritics.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@motss motss merged commit d7bcc78 into main Sep 25, 2023
@motss motss deleted the fix/137-2 branch September 25, 2023 12:48
@maksym-opanasenko
Copy link

const removeDiacritics = (input: string): string => {
return input.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
};
I was considering using this library but then handled my case with this single function

@motss
Copy link
Owner Author

motss commented Sep 28, 2023

Thanks for the suggestion. That's true when you only need to normalize certain diacritics but it does not cover all cases. You can also read the code comment for more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The letter ß (Eszett) should be normalized to ss
2 participants