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
130 stars 32 forks source link

Syntax highlighting can fail if another plugin uses Prism too #79

Open CodeFoodPixels opened 1 year ago

CodeFoodPixels commented 1 year ago

Opening this just in case folks have a similar issue, and to track it here too.

Prism's use of global can cause issues with eleventy-plugin-syntaxhighlight's dynamic loading if another plugin that is loaded afterwards also uses Prism. I think this is related to Prism's use of global for the language loader to access the Prism instance.

Also logged this on Prism: https://github.com/PrismJS/prism/issues/3636