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

Owner: Nobody in particular
Requestors: pcna [...]

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 [...]
From: pcna [...]
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 infrastructure.

Please report any issues with to