Ticket #2528165 (closed defect)

Reporter


Kurt Mielke
Opened: 08/14/12
Last modified: 12/12/12
Status: closed
Type: defect
Resolution: wontfix

Owner


Satyen Desai
Target Release:
Priority:
Summary: output lines can be (much) longer than specified with --line-break
Description:

Line breaks are only inserted after a ';'
This often result in lines being too long. I looked at the code, I think the best way was to use a tokenizer splitting at where a valid line break can be inserted, then joining the tokens, inserting
line breaks. If it is impossible to keep below the right length I think an error should be the result.
I would gladly put some time into this, but I am not sure how to tokenize non-ascii7 text.

- Curently working on a project, where the server beyond our controll chops of lines longer than 1024 :-(

Type: defect Observed in Version: 2.4.7
Component: None Severity: S4 (low)
Assigned To: Satyen Desai Target Release:
Location: Priority:
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

This .js file is processed with --line-break 80:

var x = {
"abc" : {
"efg00000000000000000000" : 7,
"hij11111111111111111111" : false,
"klm22222222222222222222" : null,
"nop33333333333333333333" : "qrs"
},
"efg" : {
"efg00000000000000000000" : 7,
"hij11111111111111111111" : false,
"klm22222222222222222222" : null,
"nop33333333333333333333" : "qrs"
}
};
var aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = "71";

I would expect:

var x={abc:{efg00000000000000000000:7,hij11111111111111111111:false,
klm22222222222222222222:null,nop33333333333333333333:"qrs"},efg:{
efg00000000000000000000:7,hij11111111111111111111:false,klm22222222222222222222

null,nop33333333333333333333:"qrs"}};var

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa="71";

(5 lines shorter than 81 chars)
But I get:

var
x={abc:efg00000000000000000000:7,hij11111111111111111111:false,klm22222222222222222222:null,nop33333333333333333333:"qrs"},efg:efg00000000000000000000:7,hij11111111111111111111:false,klm22222222222222
222222:null,nop33333333333333333333:"qrs"}};
var aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa="71";

(Two lines, line 1 is 250 chars long, line 2 is 81 chars long)

Change History

Jenny Donnelly

YUI Developer

Posted: 12/12/12
  • resolution changed to wontfix
  • status changed from new 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.