Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

List hightlight.js as optional peer dependency, for people that use prism instead #37

Open
dietergeerts opened this issue Jul 7, 2018 · 1 comment

Comments

@dietergeerts
Copy link

I like prism more, especially their themes, but when using markdown-it-prism, and thus removing highlight.js, beause I don't use it, there still is an error that it can't be found. It would be better if the loader will only use it if it's there, and otherwise doesn't use highlight.js, so in a sense, it would be an optional peer dependency. Currently it's confusing to see both prism and highlight.js in de dependency list.

@franklin-ross
Copy link

Agreed. I'm just not interested in the highlighting, and it seemed a bit silly to be forced to add it to my dependency lists.

Should be easy to fix with a try-catch around the import and just return an empty string from the default highlight function in that case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants