X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=tools%2Fjsmin.rb;h=05a5e7da16defb45140d39974e4c29157374ff0e;hp=00fd8045e0953bb11a521248dc27d4af2336c6d5;hb=9b380274dcc75e06c0cdc110f91cc8f0c4738aeb;hpb=69938d12170b6daa007b105ca4aef41f4fc616b1 diff --git a/tools/jsmin.rb b/tools/jsmin.rb index 00fd804..05a5e7d 100644 --- a/tools/jsmin.rb +++ b/tools/jsmin.rb @@ -66,12 +66,14 @@ end # peek() is used to see if a '/' is followed by a '/' or '*'. def mynext() c = get - if (c == "/") - if(peek == "/") + # saute les commentaires (également les lignes commencant pas ;;) + if (c == "/" or c == ";") + prochain = peek + if(prochain == "/" or prochain == ";") while(true) c = get - if (c <= "\n") - return c + if (c[0] <= "\n"[0]) + return c end end end