Browse Source

fix regexp

master
Denis Ryabov 11 years ago
parent
commit
e2862cf7eb
  1. 4
      jquery-emotions/jquery.emotions.js

4
jquery-emotions/jquery.emotions.js

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

Loading…
Cancel
Save