PrismJS / prism

Lightweight, robust, elegant syntax highlighting.
https://prismjs.com
MIT License
12.29k stars 1.3k forks source link

Support for Nunjucks (.njk) #1124

Closed sanorama closed 7 years ago

sanorama commented 7 years ago

Nunjucks is obviously not supported but is there any way to highlight njk syntax?

https://mozilla.github.io/nunjucks/

Golmote commented 7 years ago

Hi! The Twig highlighting should do a decent job.

sanorama commented 7 years ago

worked like a charm, thank you

francisbarton commented 4 years ago

twig didn't work well for me - I used liquid instead and this seemed to work better.

LeaVerou commented 1 year ago

Note that you can alias njk to liquid, so that if eventually a Nunjucks-specific language definition comes along, your content is ready for it:

Prism.languages.njk = Prism.languages.liquid;