Closed bebraw closed 9 years ago
I made a little package to work around the issue. It simply gives you a an object with the language definitions. As a bonus I included a JSON pattern as that's sort of important for web stuff. Later on that can be removed as the functionality gets merged to Prism.
Awesome! Want to send a PR to make it work? I'd imagine it's possible to extract lang from <code>
element's class.
Yeah, it's a trivial PR now. I'll do that later once I have a bit of time to focus. :+1:
Should be fixed in 1.0.0.
I looked into making Prism work in a generic way in a similar plugin. The primary problem is shown below:
Prism actually supports a ton of languages. Unfortunately I cannot see an easy way to access them through Node. I am not entirely sure why the entry point looks like that. It's possible I'm missing something here.
One way to "solve" this would be to set up a package that contains the language definitions in an easy to consume format. Of course there would be extra maintenance as it's easy to get out of sync with the main project.
Ideas are welcome as I would love to solve this somehow.