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

Open brace in regex causes auto-indent error #658

Open
@wbt

Description

@wbt

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions