For challenges (and other projects), we use code blocks in wiki markdown to provide examples and templates for creating Dockerfiles. The version of highlight.js that Synapse currently uses for syntax highlighting doesn't seem to know what to do with the docker or dockerfile class.
Here's what it looks like currently:
Here's what I'd expect it to look like (from https://highlightjs.org/static/demo/):
Confirmation that syntax highlighting for R seems to work fine:
This might be a separate issue, but formatting for shell also doesn't really look like I would expect:
And plaintext doesn't seem to work (should disable syntax highlighting):
: Not entirely sure. But the old version of highlight.js that we were using recognizes my example code as “bash“, where the new version marks it as “nginx“, so you might see an improvement here too.
Ah, nice. That should work well enough.
Wonder why they got rid of overrides, they don't seem very good at guessing (R->lisp, Python -> Swift, Docker -> awk, SQL, ...). Maybe it's better with longer scripts.
You can still specify the language in highlight.js (see here), but during our transition of markdown processors we lost the functionality (moving that language string into the code element css class list). The automatic code detection definitely works better with more data. Do you want to open up another issue to re-introduce this feature into the new md processor code?