-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
No kotlin syntax highlighting despite highlight.js support? #1275
Comments
The default higlightjs uses the common languages and a few select extras. Kotlin isn't in the default set. A PR to update to add Kotlin would be fine, just make sure not to remove any languages currently included. |
Ah, that's interesting and makes perfect sense. What's the criteria for being added? I doubt mdBook is being used that much for Kotlin code anyway, and the work-around is pretty simple. |
The criteria has generally been when someone asks for a new language. I don't remember exactly what the list is. You can load the current highlight.js and search for all the calls to |
Generated using the technique described in rust-lang#1275 (comment).
* List supported Highlight.js languages in guide Generated using the technique described in #1275 (comment). * Improve wording in guide
* List supported Highlight.js languages in guide Generated using the technique described in rust-lang#1275 (comment). * Improve wording in guide
* List supported Highlight.js languages in guide Generated using the technique described in rust-lang#1275 (comment). * Improve wording in guide
Running into a problem where Kotlin code snippets are not properly being highlighted.
Here is a test repository to demonstrate (generated with current git version of mdBook).
This is fixed by dropping in a new version of highlight.js in the
theme/
folder, but this is strange since according to the changelog Kotlin has been supported for a good while before the current version in mdBook (9.15).In any case, it seems updating highlight.js is trivial, so I'd be totally open to PRing in the most recent version, just was wondering if anyone else had thoughts on this (especially since I know Kotlin isn't really a target language).
The text was updated successfully, but these errors were encountered: