mirror of https://github.com/microsoft/vscode.git
Merge pull request #242121 from dibarbet/csharp_on_enter_rule_updates
Update C# onEnterRules to account for documentation comments
This commit is contained in:
commit
8005309665
|
@ -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": "/// "
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue