mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
making the regex more restrictive
This commit is contained in:
@@ -222,7 +222,7 @@
|
||||
// Indent when pressing enter from inside ()
|
||||
{
|
||||
"beforeText": "^.*\\([^\\)]*$",
|
||||
"afterText": "^[^\\(]*\\).*$",
|
||||
"afterText": "^\\s*\\).*$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": "\t",
|
||||
@@ -231,7 +231,7 @@
|
||||
// Indent when pressing enter from inside {}
|
||||
{
|
||||
"beforeText": "^.*\\{[^\\}]*$",
|
||||
"afterText": "^[^\\{]*\\}.*$",
|
||||
"afterText": "^\\s*\\}.*$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": "\t",
|
||||
@@ -240,7 +240,7 @@
|
||||
// Indent when pressing enter from inside []
|
||||
{
|
||||
"beforeText": "^.*\\[[^\\]]*$",
|
||||
"afterText": "^[^\\[]*\\].*$",
|
||||
"afterText": "^\\s*\\].*$",
|
||||
"action": {
|
||||
"indent": "indentOutdent",
|
||||
"appendText": "\t",
|
||||
|
||||
@@ -43,19 +43,19 @@ export const javascriptOnEnterRules = [
|
||||
// Indent when pressing enter from inside ()
|
||||
{
|
||||
beforeText: /^.*\([^\)]*$/,
|
||||
afterText: /^[^\(]*\).*$/,
|
||||
afterText: /^\s*\).*$/,
|
||||
action: { indentAction: IndentAction.IndentOutdent, appendText: '\t' }
|
||||
},
|
||||
// Indent when pressing enter from inside {}
|
||||
{
|
||||
beforeText: /^.*\{[^\}]*$/,
|
||||
afterText: /^[^\{]*\}.*$/,
|
||||
afterText: /^\s*\}.*$/,
|
||||
action: { indentAction: IndentAction.IndentOutdent, appendText: '\t' }
|
||||
},
|
||||
// Indent when pressing enter from inside []
|
||||
{
|
||||
beforeText: /^.*\[[^\]]*$/,
|
||||
afterText: /^[^\[]*\].*$/,
|
||||
afterText: /^\s*\].*$/,
|
||||
action: { indentAction: IndentAction.IndentOutdent, appendText: '\t' }
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user