Merge pull request #20 from dryabov/master

fix regexp
This commit is contained in:
iHedgehog 2014-03-20 14:36:38 +03:00
commit 3481973c1c

View File

@ -89,8 +89,8 @@
if (pattern[0] === ';') {
text = text
.replace(new RegExp("(^|\\W)" + $t.quote(pattern), "g"), "\\1" + rep)
.replace(new RegExp("(^|\\W)" + $t.quote(encPattent), "g"), "\\1" + rep);
.replace(new RegExp("(^|\\W)" + $t.quote(pattern), "g"), "$1" + rep)
.replace(new RegExp("(^|\\W)" + $t.quote(encPattent), "g"), "$1" + rep);
} else {
text = text
.replace(new RegExp($t.quote(pattern), "g"), rep)