cminify
cminify copied to clipboard
Invalid output with two nested types of comments
Use case: When the following comment is encountered, all code following the comment is ignored, and so the output is invalid and does no more compile:
/* ...some comments... //*/ code
cminify does it's thing right. As the line ending the block comment starts with "//" the following text "*/" is ignored.
I think the issue is legit.
The block comment takes precedence on the inline comment, so the "//" won't comment the block comment end (we're already inside a comment).
Inline comments should be ignored when inside a block comment. kind of a frustrating edge case.
Well, I use this kind of "trick" to comment/uncomment lots of code by typing only one character (add one slash "/" or remove one in the doubled-slash "//" at the beginning of the block comment). It's very useful, and all IDE I've been using for years react correctly with this kind of comment-manner.
Yes, it's kind of a frustrating edge case for me using cminify :)