pygments / pygments.rb

💎 Ruby wrapper for Pygments syntax highlighter
MIT License
572 stars 141 forks source link

JavaScript Template Strings highlighted as errors. #140

Closed dead-claudia closed 7 years ago

dead-claudia commented 9 years ago

The following should be highlighted as syntactically correct template strings:

`foo`  // equivalent to "foo"
`foo${bar}`  // equivalent to "foo" + bar
`f${oo}b${ar}`  // equivalent to "f" + oo + "b" + ar
`${foo}${bar}`  // equivalent to foo + "" + bar
`${foo}`  // equivalent to foo + ""

When each string is highlighted as a template string (like CoffeeScript's or Ruby's double-quoted strings), then I know it's been patched for the site.

This is part of the ES6 proposal, already used in production.

jledentu commented 9 years ago

+1, the Javascript lexer should be fixed

syymza commented 9 years ago

+1

rtoal commented 9 years ago

Waiting for this too. Wish I had time to contribute.

jawache commented 7 years ago

Hia, is there some work around for this?

gfx commented 7 years ago

Released pygments.rb v1.0.0 with the latest Pygments 2.2.0-snapshot.

If you have more problems, please report issues to the upstream project: https://bitbucket.org/birkenfeld/pygments-main

This gem is just a binding to it.