Snippets broken in 1.107 #203
Answered
by
savetheclocktower
croaker000
asked this question in
Pulsar Support
-
Extract from my snippets.cson file
In 1.106, it would return a portion as "$this->MODEL->debug_query". In 1.107, I get "->MODEL->debug_query" (the "$this" bit disappears) Should I be escaping the "$" now or is this a bug related to the new less upgrade? |
Beta Was this translation helpful? Give feedback.
Answered by
savetheclocktower
Aug 2, 2023
Replies: 1 comment 2 replies
-
It's not related to the Less upgrade; it'd be related to the new support for variables in the Snippets package. Please do try to escape the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK, I've verified that this works as long as you double-escape the
$
:This is happening because the snippet body parser now recognizes
$this
as a variable just like, say,$TM_CURRENT_LINE
. The LSP spec for snippets explicitly says that$
s need to be escaped with backslashes. And the double escape is necessary because CSON string parsing uses backslash escapes, so it needs to treat that as a literal backslash so that it survives until the snippets package can consume it.I regret not realizing that this would be a …