fix regexp

This commit is contained in:
Denis Ryabov 2014-03-20 15:34:31 +04:00
parent c07f33b887
commit e2862cf7eb

View File

@ -83,8 +83,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)