Skip to content

Commit a0b1e1c

Browse files
committed
Only mangle variables that don't /^[a-z]/i
1 parent 857b837 commit a0b1e1c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/pimscript.coffee

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,14 @@ catch e
292292
if VERBOSE
293293
console.log util.inspect ast, false, null, true
294294
walk ast, 0
295+
296+
old = uglify.Scope::get_mangled
297+
uglify.Scope::get_mangled = (name, newMangle) ->
298+
if /^[a-z]/i.test name
299+
return name
300+
else
301+
return old.call(@, name, newMangle)
302+
295303
ast = uglify.ast_mangle ast, {
296304
mangle: true
297305
toplevel: true

0 commit comments

Comments
 (0)