Skip to content
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

Fix invalid snippet insertion when using "Find Inplace" #476

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

VladBrok
Copy link
Collaborator

@VladBrok VladBrok commented Nov 5, 2023

Usage of vscode.SnippetString for inserting snippets to the document is resulting in parts of the text of type ${some_text} being removed (https://code.visualstudio.com/api/references/vscode-api#SnippetString).

For example, if the user opens .js file, selects "Find inplace" and enters "interpolation string", this line of code:

console.log(`I'm ${age} years old!`)

will become:

console.log(`I'm  years old!`)

Instead, the snippets should be pasted as-is.

video_00000.mp4

@mre
Copy link
Owner

mre commented Nov 6, 2023

The video can't be played. It just shows an error message that the file is corrupt. (I'm on Firefox on macOS.)
However, the changes look good. Feel free to merge. 👍

@VladBrok VladBrok merged commit 679acf2 into master Nov 10, 2023
8 checks passed
@VladBrok VladBrok deleted the fix/invalid-snippet-insert branch November 10, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants