ultisnips
ultisnips copied to clipboard
Syntax highlighting for snippet files is broken for transformations containing escaped `/`
For a snippet containing escaped /
in a transformation the syntax highlighting is broken for following lines. The snippets are expanded correctly. It is just the highlighting when the snippet file is edited.
Expected behavior:
The following snippet gets the correct syntax highlighting:
snippet if "if block"
if (${1:/* condition */}) {
${2:${VISUAL:code}}
}$0
endsnippet
Actual behavior:
And this one gets a wrong highlighting because VISUAL
allows a transformation after the colon but the syntax file does not respect the escaped /
.
snippet if "if block"
if (${1:/* condition */}) {
${2:${VISUAL:\/\* code \*\/}}
}$0
endsnippet
Steps to reproduce
- Add the above snippets to a file
c.snippets
- Edit the file
c.snippets
- Operating System: Debian GNU/Linux 11 (bullseye)
- Vim Version: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 1 2022 09:36:05) Included patches: 1-5048
- UltiSnips Version: f5ccf0977c611ffd774ca180774959301baaffad
- Python inside Vim: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
- Docker repo/vimrc: not available