Skip to content

The pascalCase snippet formatter fails to process numbers #122255

@abhibeckert

Description

@abhibeckert
  • VS Code Version: 1.55.2
  • OS Version: Mac OS 11.3

Steps to Reproduce:

  1. Add the following code snippet "Test Snippet": { "prefix": "test-snippet", "body": "${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/g}" }
  2. Create a file foo-42-bar.txt
  3. Run the test snippet
  4. Note the output is FooBar — it should be Foo42Bar

This relates to Issue #38459, and Pull Request #59758.

I believe it's a simple matter of changing [a-z] to [a-z0-9] in _toPascalCase()?


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

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code InsiderssnippetsverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions