robole / vscode-snippets-ranger

View and edit all of your snippets in one purty place! Yee-haw!!

Home Page:https://marketplace.visualstudio.com/items?itemName=robole.snippets-ranger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dollar sign disappears when creating new snippet from selection

sambody opened this issue · comments

What happens:
When I select this code in a php file, containing variables that start with dollar,

$statement = $this->pdo->prepare($sql);

and then do "Code Ranger : Add new snippet", I get the following result in the snippets json file:

"enter a name" : {
    "prefix": "",
    "body": ["  = ->pdo->prepare( );"],
    "description": ""
},

Notice above how all variables that started with a dollar completely disappeared from the selection in the resulting snippet.

What I expect:

  • The variables should not disappear.
  • The dollar should be included from the original selection, AND escaped like this:
"enter a name" : {
    "prefix": "",
    "body": ["\\$statement = \\$this->pdo->prepare(\\$sql);"],
    "description": ""
},

I hope this clarifies the issue. Many thanks.

hi @sambody ,

This issue should be resolved in v1.0.1. You can confirm this and close the issue.

I confirm it is resolved. Many thanks for that.