Glavin001 / atom-beautify

:mega: Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | :lipstick: Universal beautification package for Atom editor (:warning: Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding :heart: )
http://unibeautify.com/
MIT License
1.49k stars 454 forks source link

Inserts unwanted spaces between regex expression #2573

Closed fadsel closed 3 years ago

fadsel commented 3 years ago

Description

The results of beautification are not what I expect. This is what the code looked like before:

const order_status_response = \^\\ORDERSTATUS\w+-\w+$\;

Expected Output

The beautified code should have looked like this:

const order_status_response = \^\\ORDERSTATUS\w+-\w+$\;

Actual Output

The beautified code actually looked like this:

  const order_status_response = \ ^ \\ORDERSTATUS\ w + -\w + $\;

Checklist

I have:

fadsel commented 3 years ago

My Bad , when copying my tested regex from Regexr, it was adding backslashesinstead of the forward slashes surrounding the regex expression.