vim-pug
vim-pug copied to clipboard
No JavaScript highligt after '-' character
I cannot see any highlight if I write some JavaScript inside my pug files, for example
- var test = 'test';
Or
-
var obj = {
a:1,
b:2
}
Is such a feature not implemented yet? Thank you.
It looks like this is something that I never implemented but is actually older syntax.
I think the one-line version of -
used to work at some point, but got lost somewhere.
Here's my patch for multiline -
:
syn region pugJavascriptBlock start="^\z(\s*\)-\s*$" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript
I'm fiddling in the dark as I can't be bothered to read :help syntax
, but here's my temporary patch for oneliners:
syntax region pugJavascriptLine start=/^\s*-/ end=/$/ contains=@htmlJavascript