Ticket #2528021 (closed enhancement)

Reporter


Bernard
Opened: 01/21/10
Last modified: 12/12/12
Status: closed
Type: enhancement
Resolution: wontfix

Owner


Adam Moore
Target Release:
Priority:
Summary: Remove Semicolon at End of Line
Description:

The aim is to compress away the semicolons at every end of line.
We like statements on separate lines so that errors in production produce line numbers that help debugging.

A line break does not cost more space than a semicolon, so replacing the semicolon with a line break would be an extremely attractive compression option.

Type: enhancement Observed in Version: 2.4.2
Component: YUICompressor Severity: S2 (high)
Assigned To: Adam Moore Target Release:
Location: Priority:
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Example:

Parameters:

--type js --line-break 0

possibly additional parameter

Input:

function test(){
var var1 = 1;
var var2 = 2;
}

Desired Output:

function test(){var b=1
var a=2
}

Change History

George

YUI Developer

Posted: 01/30/10

Jenny Donnelly

YUI Developer

Posted: 12/12/12
  • resolution changed to wontfix
  • status changed from assigned to closed

Thank you for your bug report. We are deprecating YUI Compressor in favor of yuglify. Please see our announcement for more information: http://www.yuiblog.com/blog/2012/10/16/state-of-yui-compressor/. We will consider migrating these legacy tickets to GitHub if there are community maintainers willing to step up and own them.