Skip to content

Commit

Permalink
Merge pull request #9 from isra17/master
Browse files Browse the repository at this point in the history
Replace all token instead of first occurence
  • Loading branch information
jpjoyal committed Sep 26, 2013
2 parents a53a3a7 + f8b26ce commit f750a78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.jsperanto.js
Expand Up @@ -52,11 +52,11 @@

function applyReplacement(string,replacementHash){
$.each(replacementHash,function(key,value){
string = string.replace([o.interpolationPrefix,key,o.interpolationSuffix].join(''),value);
string = string.split([o.interpolationPrefix,key,o.interpolationSuffix].join('')).join(value);
});
return string;
}

function applyReuse(translated,options){
while (translated.indexOf(o.reusePrefix) != -1){
count_of_replacement++;
Expand Down

0 comments on commit f750a78

Please sign in to comment.