# Allow auto-indenting with syntax errors when using regex-based indent matches to improve bash auto-indent behavior \(\#24160\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/8742c1810707ccb41d12c8766b57e15ef7244370)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8742c1810707ccb41d12c8766b57e15ef7244370

Requested commit: 8742c1810707ccb41d12c8766b57e15ef7244370

Commit: 8742c1810707ccb41d12c8766b57e15ef7244370

Tree: 4f41c90fdaf6f4404e2e6f1b6d3f1da9bd747359

Author: Ben Kunkle

Committer: GitHub

## Message

```
Allow auto-indenting with syntax errors when using regex-based indent matches to improve bash auto-indent behavior (#24160)

- Fixes auto-indent issues around `elif` caused by auto-indent being prevented due to syntax errors generated before `elif` clause completed

Release Notes:

- Fixed an issue where inserting an elif before an else in bash would
not properly auto-indent

---------

Co-authored-by: Conrad Irwin <conrad@zed.dev>
```

## Parents

- [66d0cdfd913567492b0444603c17a71276ba9e5b](https://git.cafe/gitcafe/zed/commit/66d0cdfd913567492b0444603c17a71276ba9e5b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/8742c1810707ccb41d12c8766b57e15ef7244370?format=markdown)
