Skip to content

incorrect append double slash text while onEnter called #247477

Open
@mortalYoung

Description

@mortalYoung

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.99.3
  • OS Version: MacOS
  • Language: TypeScript

Steps to Reproduce:

  1. type text in editor [/</g, />/g]
  2. do enter after ,

Expect

the editor value be:

[/</g, 
/>/g]

Actual

[/</g, 
// />/g]

Image

Maybe

It matches this rule.

{
"beforeText": {
"pattern": "(?<!\\\\)(?<!\\w:)\/\/.*"
},
"afterText": {
"pattern": "^(?!\\s*$).+"
},
"action": {
"indent": "none",
"appendText": "// "
}
},

Normally, the beforeText which is [/</g not matches the pattern.

But at some situation i don't know, the beforeText be transformed to [//g which lost the character < and make it matched.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions