Skip to content

Update Ruby indent pattern#40292

Merged
aeschli merged 2 commits intomicrosoft:masterfrom
TeeSeal:master
Dec 15, 2017
Merged

Update Ruby indent pattern#40292
aeschli merged 2 commits intomicrosoft:masterfrom
TeeSeal:master

Conversation

@TeeSeal
Copy link

@TeeSeal TeeSeal commented Dec 15, 2017

I didn't bother to make an issue for this one but here are the problems:

  1. While I can see why it doesn't auto-indent when theres a { or ; character on the line, this behavior is not something we want when those characters are inside a string or regular expression.

  2. Some keywords are detected inside comments, leading to an auto-indent, which is also not something we want.

Current behavior:
current

Updated behavior:
updated

This PR makes auto-indent ignore characters/keywords inside strings, regular expressions and comments.
@rebornix

P.S. please take a look at my PR for the vscode-ruby extension since it overwrites this default behavior and is not yet patched.

@aeschli aeschli merged commit be686e0 into microsoft:master Dec 15, 2017
@aeschli
Copy link
Contributor

aeschli commented Dec 15, 2017

Thanks @TeeSeal !

@aeschli aeschli added this to the December 2017/January 2018 milestone Dec 15, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants