X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=tools%2Fjsmin.rb;h=83e2e40b8cf8a7216630f86aceedaf00aaba4e37;hp=00fd8045e0953bb11a521248dc27d4af2336c6d5;hb=a193d10c45d8226937c91a17dc588e4f6f1586fd;hpb=bf439b9e4b45ff729abb4e66a46a93874fa5dfb9 diff --git a/tools/jsmin.rb b/tools/jsmin.rb index 00fd804..83e2e40 100644 --- a/tools/jsmin.rb +++ b/tools/jsmin.rb @@ -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