'formater' -> 'formatter'
[euphorik.git] / js / formatter.js
index 8c3bf05..b1227f0 100644 (file)
@@ -52,7 +52,7 @@ euphorik.Formatter.prototype.getSmilesHTML = function() {
 };\r
 \r
 /**\r
 };\r
 \r
 /**\r
-  * Complete fomratting process applied to a text.\r
+  * Complete formatting process applied to a text.\r
   *  - Remove HTML markups\r
   *  - Substitutes wiki syntax with HTML\r
   *  - Replaces URL with 'a' tag\r
   *  - Remove HTML markups\r
   *  - Substitutes wiki syntax with HTML\r
   *  - Replaces URL with 'a' tag\r
@@ -99,14 +99,14 @@ euphorik.Formatter.prototype.remplacerBalisesHTML = function(m) {
 };\r
 \r
 euphorik.Formatter.prototype.traiterURL = function(m, nick) {\r
 };\r
 \r
 euphorik.Formatter.prototype.traiterURL = function(m, nick) {\r
-   var thisFormater = this;\r
+   var thisFormatter = this;\r
    var traitementUrl = function(url) {    \r
       // si ya pas de protocole on rajoute "http://"\r
    var traitementUrl = function(url) {    \r
       // si ya pas de protocole on rajoute "http://"\r
-      if (!thisFormater.regexTestIfProtocolExists.test(url)) {\r
+      if (!thisFormatter.regexTestIfProtocolExists.test(url)) {\r
          url = "http://" + url;\r
       }\r
          url = "http://" + url;\r
       }\r
-      var extension = thisFormater.getShort(url);\r
-      return "<a " + (extension[1] ? "title=\"" + (nick ? thisFormater.traiterPourFenetreLightBox(nick, url) + ": " : "") +  thisFormateur.traiterPourFenetreLightBox(m, url) + "\"" + " rel=\"lightbox\"" : "") + " href=\"" + url + "\" >[" + extension[0] + "]</a>";\r
+      var extension = thisFormatter.getShort(url);\r
+      return "<a " + (extension[1] ? "title=\"" + (nick ? thisFormatter.traiterPourFenetreLightBox(nick, url) + ": " : "") +  thisFormateur.traiterPourFenetreLightBox(m, url) + "\"" + " rel=\"lightbox\"" : "") + " href=\"" + url + "\" >[" + extension[0] + "]</a>";\r
    };\r
    return m.replace(this.regexUrl, traitementUrl);\r
 };\r
    };\r
    return m.replace(this.regexUrl, traitementUrl);\r
 };\r
@@ -174,9 +174,9 @@ euphorik.Formatter.prototype.supprimerSmiles = function(m) {
   * TODO : trouver un moyen pour que les smiles puissent être conservés\r
   */\r
 euphorik.Formatter.prototype.traiterPourFenetreLightBox = function(M, urlCourante) {\r
   * TODO : trouver un moyen pour que les smiles puissent être conservés\r
   */\r
 euphorik.Formatter.prototype.traiterPourFenetreLightBox = function(M, urlCourante) {\r
-   var thisFormater = this;\r
+   var thisFormatter = this;\r
    var traitementUrl = function(url) {\r
    var traitementUrl = function(url) {\r
-      return "[" + thisFormater.getShort(url)[0] + (urlCourante === url ? "*" : "") + "]";\r
+      return "[" + thisFormatter.getShort(url)[0] + (urlCourante === url ? "*" : "") + "]";\r
    };\r
    \r
    return this.remplacerBalisesHTML(this.supprimerSmiles(M)).replace(this.regexUrl, traitementUrl);\r
    };\r
    \r
    return this.remplacerBalisesHTML(this.supprimerSmiles(M)).replace(this.regexUrl, traitementUrl);\r