Skip Menu |
 

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

Report information
The Basics
Id: 116792
Status: new
Priority: 0/
Queue: JavaScript-Beautifier

People
Owner: Nobody in particular
Requestors: pcna [...] zacglen.net
Cc:
AdminCc:

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



Subject: simple parse error, breaks jQuery beautification
Date: Tue, 9 Aug 2016 10:35:38 +1000
To: bug-JavaScript-Beautifier [...] rt.cpan.org
From: pcna [...] zacglen.net
Download (untitled) / with headers
text/plain 633b
There is a simple bug that arises when attempting to beautify, for example, jQuery minimized script. The Beautifier turns this: /^(get|post|head|put|delete|options)$/ i.test(this.type) ... into this: / ^(get | post | head | put | delete | options) $ / i.test(this.type) && It raises a JavaScript parse error. Beautifier should not insert additional white-space inside of regular expressions. They should be treated like quoted strings. Possibly might be caused by the wider context which is: return !this.isLocal && // several comment lines /^(get|post|head|put|delete|options)$/ i.test(this.type)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.