sbecker / asset_packager

JavaScript and CSS Asset Compression for Production Rails Apps
http://synthesis.sbecker.net/pages/asset_packager
516 stars 102 forks source link

Javascript line continuations in strings causes errors #8

Open shaicoleman opened 14 years ago

shaicoleman commented 14 years ago
vendor/plugins/asset_packager/lib/jsmin.rb:113:in `action': Unterminated string literal (RuntimeError)
    from vendor/plugins/asset_packager/lib/jsmin.rb:195:in `jsmin'
    from vendor/plugins/asset_packager/lib/jsmin.rb:205

Which is caused by code such as: styleSheet.addRule( '.typeface-js-selected-text', '-ms-filter: \ "Chroma(color=black) \ progid:DXImageTransform.Microsoft.MaskFilter(Color=white) \ progid:DXImageTransform.Microsoft.MaskFilter(Color=blue) \ alpha(opacity=30)" !important; \ color: black; \ font-family: Modern; \ position: absolute; \ white-space: pre; \ filter: alpha(opacity=0);' );

cainlevy commented 14 years ago

you may try http://github.com/cainlevy/asset_packager/commit/4430b2cbb7b43f4560dcf67938265dcffb056623