-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
options.space in false should at least keep one for safety #11
Comments
That's fairly unusual way of documenting the code. But of you run into something this strange, option space lets you replace all comment blocks with spaces. |
I for one not seen this form as well, however in Set
|
This must have been a recent change in how Angular is now bundled, For I used previous versions of it to test this library, and such things weren't there. For the time being replacing comments with spaces is the only option, unfortunately, as this issue never came up before. Later on though, I could extend option
I honestly do not see it being a drawback. |
Any chance to have fixed without using > echo "var/* jsdoc */age = 42" | uglifyjs
> var age=42 |
To get an idea try replacing your example with these, see what
and
|
Thinking that I can live with space number option.
By drawback I meant the default setting does not as safe as verbose JavaScript parsing, rather be a performance tradeoff in this case. |
Examples like |
I will look at extending the |
Escalating this into a bug, i.e. the library cannot process correctly special-case multi-line comments, removal of which results into code fusion: var/*comment*/name;
// should become:
var name;
// and not:
varname; The same with multi-line comments: var/* multi-line
comment */name; Granted this is an edge case, and an odd way of adding comments, but should be supported nonetheless. Presently it only works when using option I have committed the tests + TODO-s that need to be implemented in the code. A PR to fix the issue would be very welcome! |
Consider this edge case:
Which emits:
The text was updated successfully, but these errors were encountered: