Skip to content
This repository was archived by the owner on Mar 19, 2023. It is now read-only.
This repository was archived by the owner on Mar 19, 2023. It is now read-only.

C-style JavaScript comments without a line break at the end of a file... #71

Description

@sebastien-fauvel

...break the minified version when prepended to another file.

I've had this issue with qtip.min.js:

/* qTip2 v2.2.1 | Plugins: tips viewport imagemap svg modal ie6 | Styles: core basic css3 | qtip2.com | Licensed MIT | Sat Sep 06 2014 18:25:06 */

!function(a,b,c){/* Their code here... */}(window,document);
//# sourceMappingURL=//cdn.jsdelivr.net/qtip2/2.2.1//var/www/qtip2/build/tmp/tmp-656464emu9s/jquery.qtip.min.map

They're missing a trailing line break (which is ok), but when you combine it to other files and minify, the output is broken – the first line of code from the next file is missing. I think we should simply "sanitize" input files by adding a trailing line break if missing. Any objection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions