GithubHelp home page GithubHelp logo

Comments (4)

matthiasmullie avatar matthiasmullie commented on August 17, 2024 1

It took me awhile to figure out what went wrong here. I couldn't reproduce it as my IDE keeps adding an empty newline at the end of every file.

Anyway: when a script ends in a single-line comment & the next script is joined, it doesn't start at a newline, just right behind the previous script. Which results in it being part of the single-line comment, right until the next \n

5d1886a should fix this problem. Released 1.3.18

from minify.

matthiasmullie avatar matthiasmullie commented on August 17, 2024

I can't reproduce this issue - I tried minifying the above example and it seemed to do so correctly.
Any chance you could attach an exact example of an original file that fails this way, after minifying it?

from minify.

pixelhomie avatar pixelhomie commented on August 17, 2024

I tried to minify Bootstrap Toggle (http://www.bootstraptoggle.com) and holder.js (http://imsky.github.io/holder). With the current master i get a different error: "Uncaught SyntaxError: Unexpected identifier". It seems that not all comments are removed in this file.

Minified file: http://www.file-upload.net/download-10261212/scripts.js.html

from minify.

pixelhomie avatar pixelhomie commented on August 17, 2024

Working perfect. Thank You!

from minify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.