Closed dead-claudia closed 6 years ago
I have a bunch of snippets where a group references another group:
'.source.js':
'Console Log':
'prefix': 'cl'
'body': '$3console.${2:log}($1);$0'
'Console Log (verbose)':
'prefix': 'cll'
'body': "$4console.${3:log}('${2:$1}', $1);$0"
'Console Log (labeled, verbose)':
'prefix': 'clll'
'body': "$5console.${4:log}('$1: ${3:$2}', $2);$0"
Typing cll ⇥
and typing something would result in 2 cursors:
console.log("myMysteryHash|", myMysteryHash|);
But now, it only does
console.log("[object Object]", myMysteryHash|);
I do not see the ${2:$1}
pattern mentioned anywhere in the snippet docs. Was I just taking advantage of something I shouldn't have?
Could there be a backreference
format instead, like ${2:\\1}
?
Oddly enough, this usage had no coverage in the tests. #267 ought to fix it.
Thanks for the report @isiahmeadows, just noting that I can reproduce on macOS 10.12.6 with 1.26.0-beta1 but it's not reproducible on 1.24.1 like you mentioned.
@rsese Thanks! (It kind of didn't help that it broke some of my most frequently used snippets - I noticed within minutes of upgrading and about 36 hours from when it was first released.)
Fixed in #267
Prerequisites
Description
[Description of the issue]
Steps to Reproduce
'() => ${1:\\{$2\\}}'
Expected behavior: [What you expect to happen]
It to expand like this with the brackets selected:
Actual behavior: [What actually happens]
It expands like this, with the brackets selected:
Reproduces how often: [What percentage of the time does it reproduce?]
100% of the time
Versions
You can get this information from copy and pasting the output of
atom --version
andapm --version
from the command line. Also, please include the OS and what version of the OS you're running.Atom v1.25.0 on macOS 64-bit. This bug did not exist in v1.24.1.
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.