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

Unicode flag breaking older browsers #5

Closed
charlesLoder opened this issue Nov 4, 2019 · 0 comments
Closed

Unicode flag breaking older browsers #5

charlesLoder opened this issue Nov 4, 2019 · 0 comments

Comments

@charlesLoder
Copy link
Owner

Since the Hebrew characters are not a part of the astral plane the u flag is not really necessary.

// remove.js
// line 11
module.exports = (text, options = {removeVowels: false}) => !options.removeVowels ? text.replace(/[\u0591-\u05F4, \uFB1D-\uFB4F]/gu, i => hebCharsRC[i]) : text.replace(/[\u0591-\u05F4, \uFB1D-\uFB4F]/gu, i => hebCharsRV[i]);

Probably need to redo in the manner of titForTas.js:

module.exports = text => [...text].map(char => char in hebChars ? hebChars[char] : char)
                                  .reduce((a, c) => a + c)
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

No branches or pull requests

1 participant