Opened 10 years ago

Closed 8 years ago

#9682 closed defect (patchwelcome)

ShrinkSafe obfuscates _ character when it shouldn't

Reported by: dante Owned by: Richard Backhouse
Priority: low Milestone: future
Component: ShrinkSafe Version: 1.3.2
Keywords: needsreview Cc:
Blocked By: Blocking:

Description

Seems like an edge case, but ShrinkSafe? is improperly replacing a single-character parameter in a function signature with a longer variable. eg:

var foo = function(_, longer){ }

turns into:

var _1 = function(_2, _3){ }

fwiw, passed same sample through YUI Compressor and get:

var a=function(b,c){}

Attachments (1)

underscore.test.patch (1.0 KB) - added by dante 10 years ago.
unit test failing to meet expectations.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by dante

note, this only applies to the character "_" for some reason.

var foo = function(a, longer){}

becomes

var _1 = function(a, _2){}

Changed 10 years ago by dante

Attachment: underscore.test.patch added

unit test failing to meet expectations.

comment:2 Changed 10 years ago by Adam Peller

Owner: changed from alex to Richard Backhouse

comment:3 Changed 10 years ago by Adam Peller

Milestone: tbd1.5

comment:4 Changed 9 years ago by Adam Peller

Milestone: 1.51.6

comment:5 Changed 9 years ago by bill

Milestone: 1.6future

(sadly) punting seemingly abandoned ticket and meta tickets to future

comment:6 Changed 8 years ago by ben hockey

Keywords: needsreview added

comment:7 Changed 8 years ago by bill

Resolution: patchwelcome
Status: newclosed

I think closure will be the compressor of choice going forwards, and we don't have anyone working on shrinksafe, so closing this ticket.

Note: See TracTickets for help on using tickets.