hsnips
hsnips copied to clipboard
Escape character not working for code blocks in markdown
At the beginning, I tried to write
snippet cpp "C++ code block" i
```cpp
$1
```
endsnippet
However, this whole extension broke down. I think it is the backquotes' fault.
Then I tried to write
snippet cpp "C++ code block" i
\`\`\`cpp
$1
\`\`\`
endsnippet
And here is the consequence after I press Tab:
It seems that backslash cannot play a role as escape character.
I have same issue. After some trials, I found this below snippet works.
snippet cpp "C++ code block"
``rv = "\`\`\`cpp";``
$0
``rv = "\`\`\`";``
endsnippet
Obviously, this solution is not beautiful.