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: update normalize regex to support arabic + hebrew #74

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

theRealPadster
Copy link
Owner

@theRealPadster theRealPadster commented Jan 2, 2024

As per Github Copilot's recommendation:

Sure, you can add Arabic and Hebrew letters to your regular expression. Arabic letters range from \u0621 to \u064A and Hebrew letters range from \u05D0 to \u05EA. Here is how you can modify your code:
This code will now also allow Arabic and Hebrew letters.

// Remove everything (including spaces) that is not a number, letter, Cyrylic alphabet, Polish alphabet, Arabic and Hebrew letters
cleaned = cleaned.replace(/[^\wа-яА-ЯіїІЇ\dąćęłńóśźż\u0621-\u064A\u05D0-\u05EA\d]/g, '');

@theRealPadster theRealPadster linked an issue Jan 2, 2024 that may be closed by this pull request
@theRealPadster theRealPadster merged commit 9202f04 into main Jan 2, 2024
2 checks passed
@theRealPadster theRealPadster deleted the fix/arabic-hebrew-letters branch January 2, 2024 23:09
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.

support to arabic and hebrew song titles
1 participant