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

Fix regular expression for unicode symbols in JS - #507

Open
MaestroSc2 wants to merge 1 commit into
joypixels:masterfrom
MaestroSc2:master
Open

Fix regular expression for unicode symbols in JS#507
MaestroSc2 wants to merge 1 commit into
joypixels:masterfrom
MaestroSc2:master

Conversation

@MaestroSc2

Copy link
Copy Markdown

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