tikitu / jsmin

Javascript minifier
MIT License
90 stars 17 forks source link

spaces within backtick strings are left out in some circumstances #37

Open louking opened 2 years ago

louking commented 2 years ago

e.g.,

d3.selectAll(`#${that.options.statstable.containerid} table`).style("display", null);

is compressed to

d3.selectAll(`#${that.options.statstable.containerid}table`).style("display",null);

Note the missing space between } and table

tikitu commented 2 years ago

The current version does not promise to support backtick strings. You might get success by using the quote_chars parameter, but it's not explicitly supported; in particular there aren't robust tests for the various things that can appear inside the string. I no longer maintain jsmin to keep up with changes to javascript's syntax.