Comments (4)
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.
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.
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.
Working perfect. Thank You!
from minify.
Related Issues (20)
- JS line comment not working - SOLVED.
- text onchange in the script HOT 1
- incorrect behavior when ยซ\\ยป in JS
- Multiline comments not always stripped HOT 2
- Big performance loss in CSS-minify HOT 10
- Invalid max syntax on output
- CSS variables with default values lose their units which makes calculations that they participate in invalid HOT 2
- Class "MatthiasMullie\PathConverter\Converter" not found HOT 2
- Minify is not minifying JS/CSS files
- Waiting for the new version HOT 6
- idea to obfuscate JS on output
- /* cd */ trips up minifier HOT 1
- Minifying backticks
- Issue with the import combination
- openbasedir restrictions throws exception with is_file() HOT 1
- JS whiteSpace removes the whole script
- Incorrect export handling
- Minifying Multiple CSS/JS Files & Creating a Single, Minified File Without Repeated Standard Header Comments
- Minified CSS, broken since version 1.3.72 HOT 8
- After generating in some cases it is adding slash "/"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minify.