Skip to content
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

syntax highlighting only working for rust #25

Open
ettoreleandrotognoli opened this issue Jun 28, 2023 · 0 comments
Open

syntax highlighting only working for rust #25

ettoreleandrotognoli opened this issue Jun 28, 2023 · 0 comments

Comments

@ettoreleandrotognoli
Copy link

ettoreleandrotognoli commented Jun 28, 2023

I'm having this waning log:

Could not find the language 'cpp', did you forget to load/include a language module? [lib.js:152:25938](http://localhost:3000/quiz/lib.js)
Falling back to no-highlight mode for this block. 
<code class="language-cpp">
[lib.js:152:25973](http://localhost:3000/quiz/lib.js)

My question:

[[questions]]
type = "MultipleChoice"
prompt.prompt = """
```cpp
int x = 0;
```
"""

I have the same error with python too.
I think it is because the code only imports rust:

import rust from "highlight.js/lib/languages/rust";

And indeed for rust the highlight is working

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

No branches or pull requests

1 participant