Quantcast
Channel: ajaxmin Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 683

Commented Issue: Important comments aren't always preserved [19416]

$
0
0
Looks like important comments need to be at the document level to be preserved:

```
Something.init(
/*!This is an important comment */
);
/*!This is an important comment too! */
function Dennis() {
/*!So is this */
}
```

Gets minified to:

```
function Dennis(){}Something.init();
/*!This is an important comment too! */
```
Comments: ** Comment from web user: ronlo **

Unfortunately not: there is no work-around as of right now, since comments embedded within expressions or statement structures are not preserved in the DOM at this time. Only statement-level important comments carry through, because I create a special "statement" DOM node for important comments at those locations. But hold on; I would expect /*!So is this */ to be preserved, too, since it's a statement-level comment. Something seems amiss here; I'll look into it.


Viewing all articles
Browse latest Browse all 683

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>