Skip to content

Fix useStateSnippet when called through snippet search #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix regex used for Capitalize
  • Loading branch information
otavio committed Apr 2, 2024
commit da1211638418f9605d4a90fa43360f0f68e7d888
2 changes: 1 addition & 1 deletion src/helpers/snippetPlaceholders.ts
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ export const revertSnippetPlaceholders = (snippetString: string) => {
.replace(new RegExp(/\${2:second}/, 'g'), Placeholders.SecondTab)
.replace(new RegExp(/\${3:third}/, 'g'), Placeholders.ThirdTab)
.replace(
new RegExp(/\${1\/(.*)\/${1:\/capitalize}\/}/, 'g'),
new RegExp(/\${1\/\(\.\*\)\/\${1:\/capitalize}\/}/, 'g'),
Placeholders.Capitalize,
);
};