Skip Menu |

This queue is for tickets about the JavaScript-Minifier-XS CPAN distribution.

Report information
The Basics
Id: 130347
Status: open
Priority: 0/
Queue: JavaScript-Minifier-XS

People
Owner: Nobody in particular
Requestors: MAT [...] cpan.fsck.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



Subject: Bug when minifying ES6 template literals
Hi, In 2015, with ES6/ES2016, came template literals. For exemple, where before one would have needed to write: vat = $("#items-" + i + "-vat_id :selected"); One now can write: vat = $(`#items-${i}-vat_id :selected`); It's more concise and well, looks more like real code. In any way, the problem is that JavaScript-Minifier-XS does not recognizes this, and minifies this as: vat=$(`#items-${i}-vat_id:selected`); Stripping the space inside the template.
On Tue Aug 20 09:12:37 2019, MAT wrote: Show quoted text
> Hi, > > In 2015, with ES6/ES2016, came template literals.
I'm being hit with the same bug, and multi-line templates break with the error "unterminated quoted string literal"