Closed jakob-fuchs closed 6 years ago
Thank you for reporting an issue. Really good point! I just need to work out the regex with correct negative lookahead and I'll amend the logic for ST snippets.
Thanks for adding this, but this introduced another problem.
$test = "test";
Will be converted to:
\$test= "test";
It looks like any character directly following the escaped token will be removed.
Sorry to bother you again, I found another related problem.
$this->someMethod()
Gets converted to
\$this>someMethod()
Uuuuups :)
I see that two slashes are needed to escape the $ sign.
Like this:
\\$
I tried to review and find an issue. At this moment it works like this…
$test = 'test'
-> \$test = 'test'
$this->someMethod()
-> \$this->someMethod()
In my opinion the current version of regex covers majority of situation. if you can help me to find some addition edge cases please list below. For the time being I'm closing the issue.
It would be a nice addition if the dollar sign ($) could be escaped automatically. This is necessary for sublime text when it is used in the actual code snippet.
Instead of: