Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97552

Visual studio code user snippets capitalize not working properly

$
0
0

I wrote such code

"State": {
    "prefix": "state",
    "body": [
        "const [$1, set${1:/capitalize}] = useState($2);"
    ],
    "description": "Adds state"
},

I expect that the result will be (if I enter test in $1) like this:

const [test, setTest] = useState($2);

But I get such result:

const [/capitalize, set/capitalize] = useState();

In official docs I found such rule: '${' int ':''/upcase' | '/downcase' | '/capitalize''}'.

Could you please tell what I am doing wrong?


Viewing all articles
Browse latest Browse all 97552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>