TypeScript restrict Comment onEnterRules inside comment body (#251692)

* TypeScript: Restrict Comment onEnterRules cursor inside comment body

* TypeScript: Simply Comment onEnterRule

* polish

---------

Co-authored-by: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
This commit is contained in:
RedCMD 2025-06-18 01:52:11 +12:00 committed by GitHub
parent 846585a0e0
commit 2b7ad1a13f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 12 deletions

View File

@ -230,12 +230,8 @@
}, },
// Add // when pressing enter from inside line comment // Add // when pressing enter from inside line comment
{ {
"beforeText": { "beforeText": "(?<!\\\\|\\w:)\/\/\\s*\\S",
"pattern": "(?<!\\\\)(?<!\\w:)\/\/.*" "afterText": "^(?!\\s*$).+",
},
"afterText": {
"pattern": "^(?!\\s*$).+"
},
"action": { "action": {
"indent": "none", "indent": "none",
"appendText": "// " "appendText": "// "

View File

@ -248,12 +248,8 @@
}, },
// Add // when pressing enter from inside line comment // Add // when pressing enter from inside line comment
{ {
"beforeText": { "beforeText": "(?<!\\\\|\\w:)\/\/\\s*\\S",
"pattern": "(?<!\\\\)(?<!\\w:)\/\/.*" "afterText": "^(?!\\s*$).+",
},
"afterText": {
"pattern": "^(?!\\s*$).+"
},
"action": { "action": {
"indent": "none", "indent": "none",
"appendText": "// " "appendText": "// "