Open CodeFoodPixels opened 1 year ago
I have this issue with https://github.com/stoplightio as well. I'm using prism-react-renderer and adding in custom language support by utilizing (typeof global !== 'undefined' ? global : window).Prism = Prism
as per the docs, but this breaks anything else using Prism for code highlighting.
Information:
Description Because Prism uses
global
, this can cause issues if someone uses multiple modules that use Prism themselves. In my case I have an Eleventy site that uses eleventy-plugin-syntaxhighlight and I'm also building a separate plugin that uses Prism. Because my plugin isrequire
d after eleventy-plugin-syntaxhighlight, it causes eleventy-plugin-syntaxhighlight to fail converting some languages.