Is the problem with automatic code blocks (no language specified) or with language specified?
The shorter the code samples are, the more likely it is that the library will detect the wrong language. You can specify a language explicitly if you want, like this:
```js
var test = '';
```
The library that Flarum uses for code highlighting is https://highlightjs.org/
We might not be using the very latest version though, I'm not sure if the version number can be easily found from source, otherwise you would have to check which version of TextFormatter is used by Flarum, and then find which version of HighlightJS is used by that version of TextFormatter.