Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Open brace in regex causes auto-indent error #658

Open
wbt opened this issue Aug 28, 2019 · 1 comment
Open

Open brace in regex causes auto-indent error #658

wbt opened this issue Aug 28, 2019 · 1 comment

Comments

@wbt
Copy link

wbt commented Aug 28, 2019

This Issue is very similar to #646.

Steps to Reproduce

  1. In Atom, create a new Javascript file or edit an existing one.
  2. Add the following lines of code:
var matches = line.match(/{/);
console.log("Javascript line to follow");
  1. Select that code, and/or all code in the file.
  2. Autoindent.

Expected behavior:
These two lines of code are indented to the same level, whatever that may be, as shown above.

Actual behavior:
The second line, and all which follow, are indented one extra level.

Edit by @rsese to add screenshot

auto-indent-with-regex-brace

Reproduces how often:
Every time.

Versions

atom --version:
Atom : 1.23.2
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
apm --version:
apm 2.4.3
npm 6.2.0
node 10.2.1 x64
atom 1.40.1
python
git 2.15.0.windows.1
visual studio 2015

Windows 10

@rsese
Copy link

rsese commented Aug 29, 2019

Thanks again for reporting 👍 Reproduced with 1.40.1 on macOS 10.14.6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants