mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Update C# onEnterRules to account for documentation comments
This commit is contained in:
@@ -84,9 +84,10 @@
|
||||
},
|
||||
"onEnterRules": [
|
||||
// Add // when pressing enter from inside line comment
|
||||
// We do not want to match /// (a documentation comment)
|
||||
{
|
||||
"beforeText": {
|
||||
"pattern": "\/\/.*"
|
||||
"pattern": "[^\/]\/\/[^\/].*"
|
||||
},
|
||||
"afterText": {
|
||||
"pattern": "^(?!\\s*$).+"
|
||||
@@ -96,5 +97,16 @@
|
||||
"appendText": "// "
|
||||
}
|
||||
},
|
||||
// Add /// when pressing enter from anywhere inside a documentation comment.
|
||||
// Documentation comments are not valid after non-whitespace.
|
||||
{
|
||||
"beforeText": {
|
||||
"pattern": "^\\s*\/\/\/"
|
||||
},
|
||||
"action": {
|
||||
"indent": "none",
|
||||
"appendText": "/// "
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user