X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Fformatter.js;h=b1227f06658c4dcde09a7b98c35b7d10eb7b6fb9;hp=8c3bf051d96afdfbc8ace5d6c4ccdb1072ad8d2a;hb=4a6c575807a90370c0069b688026b10102e1ce10;hpb=6926aecb1cdd777ef8c52f63291341a540670a2c diff --git a/js/formatter.js b/js/formatter.js index 8c3bf05..b1227f0 100644 --- a/js/formatter.js +++ b/js/formatter.js @@ -52,7 +52,7 @@ euphorik.Formatter.prototype.getSmilesHTML = function() { }; /** - * Complete fomratting process applied to a text. + * Complete formatting process applied to a text. * - Remove HTML markups * - Substitutes wiki syntax with HTML * - Replaces URL with 'a' tag @@ -99,14 +99,14 @@ euphorik.Formatter.prototype.remplacerBalisesHTML = function(m) { }; euphorik.Formatter.prototype.traiterURL = function(m, nick) { - var thisFormater = this; + var thisFormatter = this; var traitementUrl = function(url) { // si ya pas de protocole on rajoute "http://" - if (!thisFormater.regexTestIfProtocolExists.test(url)) { + if (!thisFormatter.regexTestIfProtocolExists.test(url)) { url = "http://" + url; } - var extension = thisFormater.getShort(url); - return "[" + extension[0] + "]"; + var extension = thisFormatter.getShort(url); + return "[" + extension[0] + "]"; }; return m.replace(this.regexUrl, traitementUrl); }; @@ -174,9 +174,9 @@ euphorik.Formatter.prototype.supprimerSmiles = function(m) { * TODO : trouver un moyen pour que les smiles puissent être conservés */ euphorik.Formatter.prototype.traiterPourFenetreLightBox = function(M, urlCourante) { - var thisFormater = this; + var thisFormatter = this; var traitementUrl = function(url) { - return "[" + thisFormater.getShort(url)[0] + (urlCourante === url ? "*" : "") + "]"; + return "[" + thisFormatter.getShort(url)[0] + (urlCourante === url ? "*" : "") + "]"; }; return this.remplacerBalisesHTML(this.supprimerSmiles(M)).replace(this.regexUrl, traitementUrl);