FIX la css généré dans yaws lorsque la personne n'est pas connecté
[euphorik.git] / tools / jsmin.rb
index 00fd804..83e2e40 100644 (file)
@@ -66,12 +66,23 @@ end
 # peek() is used to see if a '/' is followed by a '/' or '*'.
 def mynext()
     c = get
+    # saute les commentaires (également les lignes commencant pas ;;)
+    
+    if (c == ";" and peek == ";")
+      while(true)
+          c = get
+          if (c[0] <= "\n"[0])
+            return c
+          end
+      end
+    end
     if (c == "/")
-        if(peek == "/")
+       prochain = peek
+        if(prochain  == "/")
             while(true)
                 c = get
-                if (c <= "\n")
-                return c
+                if (c[0] <= "\n"[0])
+                  return c
                 end
             end
         end