projects
/
euphorik.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MOD maj TODO
[euphorik.git]
/
tools
/
jsmin.rb
diff --git
a/tools/jsmin.rb
b/tools/jsmin.rb
index
00fd804
..
83e2e40
100644
(file)
--- 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
# 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 (c == "/")
- if(peek == "/")
+ prochain = peek
+ if(prochain == "/")
while(true)
c = get
while(true)
c = get
- if (c
<= "\n"
)
- return c
+ if (c
[0] <= "\n"[0]
)
+
return c
end
end
end
end
end
end