Skip to content

Commit

Permalink
Fix JS/TS indentation for if (...) | {} case
Browse files Browse the repository at this point in the history
Fixes #30933
  • Loading branch information
mjbvz committed Jul 31, 2017
1 parent 9198547 commit e9764d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extensions/typescript/src/typescriptMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,12 @@ class LanguageProvider {
// e.g. *-----*/|
beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/,
action: { indentAction: IndentAction.None, removeText: 1 }
},
{
// e.g. if (...) | {}
beforeText: /^\s*(for|while|if|else)\s*/,
afterText: /^\s*{/,
action: { indentAction: IndentAction.None }
}
]
}));
Expand Down

0 comments on commit e9764d9

Please sign in to comment.