Closed
Description
Syntax highlighing is currently performed client-side which has a few drawbacks:
- We need to ship a 700kB library to the client which hurts performance
- There is a flash of unhighlighted code on every page load
- Language detection of highlight.js does not work based on filenames but on the code itself, giving a lot of false highlights (we could probably fix by mapping more file extensions, thought).
It may be worth investigating integrating https://github.com/alecthomas/chroma as server-side highlight. It supports language detection based on filename out of the box.