-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi lang support #26
base: main
Are you sure you want to change the base?
Multi lang support #26
Conversation
10d9a41
to
13b49e8
Compare
Thanks for the contribution! I would like mdbook-quiz to support syntax highlighting for multiple languages. However, the issue with the current PR is that it increases the bundle size by 50%, from ~2MB to ~3MB. I specifically avoided doing this: import hljs from "highlight.js"; Because that includes by default every language, which is a lot of code. I think the best way to support multiple languages without bloating the bundle would be the following:
I would accept a version of this PR that adopts this or a comparable strategy. |
Hello @willcrichton , thanks for the feedback, I'll work on that ^^ I have some questions: As mdbook supports some languages by default, would be better to support the same languages by default too? As mdbook already uses Highlight.js do you think there is a way to use the same instance instead of importing it again in this library? |
Yes, it would be fine to use the mdBook highlight.js library. However, it's important that the |
bc8d578
to
fa71479
Compare
Hello,
I'm trying to resolve this issue #25
I was able to generate the example, and it is working, but even from the main branch I was not able to run the tests, at least I can't figure out how to do it.