Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No JavaScript highligt after '-' character #98

Open
caneta opened this issue Feb 22, 2017 · 3 comments
Open

No JavaScript highligt after '-' character #98

caneta opened this issue Feb 22, 2017 · 3 comments

Comments

@caneta
Copy link

caneta commented Feb 22, 2017

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.

@digitaltoad
Copy link
Owner

It looks like this is something that I never implemented but is actually older syntax.

@moll
Copy link

moll commented Apr 23, 2017

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

@moll
Copy link

moll commented Apr 23, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants