mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
escape the special character (#22141)
This commit is contained in:
@@ -375,7 +375,8 @@ class DropOverlay extends Themable {
|
||||
// {{SQL CARBON EDIT}}
|
||||
const editor = this.editorService.activeTextEditorControl as ICodeEditor;
|
||||
if (supportsNodeNameDrop(untitledOrFileResources[0].resource.scheme) || untitledOrFileResources[0].resource.scheme === 'Folder') {
|
||||
SnippetController2.get(editor).insert(untitledOrFileResources[0].resource.query);
|
||||
// Snippet support variable and $ is the reserved character, need to escape it so that it will treated as a normal character.
|
||||
SnippetController2.get(editor).insert(untitledOrFileResources[0].resource.query?.replace(/\$/g, '\\$'));
|
||||
editor.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user