11ty / eleventy-plugin-syntaxhighlight

A pack of Eleventy plugins for syntax highlighting in Markdown, Liquid, and Nunjucks templates.
https://www.11ty.dev/docs/plugins/syntaxhighlight/
MIT License
129 stars 32 forks source link

Add prismjs alias for `nunjucks` mapped to `jinja2` #68

Closed zachleat closed 2 years ago

zachleat commented 2 years ago

Nunjucks is essentially a port of jinja2

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

zachleat commented 2 years ago

Both njk and nunjucks will be aliased to jinja2 on 4.1.0+

edwardhorsford commented 10 months ago

@zachleat this doesn't seem to be working correctly for me, though it does answer why njk and nunjucks aren't erroring for me.

From my reading of this, when I use nunjucks it should look the same as jinja2 however they don't!

With nunjucks: Screenshot 2024-01-25 at 18 21 50

With jinja2: Screenshot 2024-01-25 at 18 22 26

It's clearly doing something with the highlighting, but it's not correct, and it's not the same as jinja2. I observe the same when used as a shortcode and when used with markdown backticks. Using plugin v5.0.0