Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Fix regular expression for unicode symbols in JS #507

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaestroSc2
Copy link

Fixed bug with regular expression in JS since in some cases it worked wrong.

Since regular expression determined using constructor new RegExp, the symbols \ should be shielded by \.
For example:
from:
ns.regUnicode = new RegExp("…[\uDC66-\uDC69\uDC8B]…", "g")
to:
ns.regUnicode = new RegExp("…[\\uDC66-\\uDC69\\uDC8B]…", "g")

alexmunda added a commit to alexmunda/draft-js-plugins that referenced this pull request Apr 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants