HighlightJS

Automatically detects the language.

F#:

        
let Main () =
    let hljsConfig = WebSharper.HighlightJS.Options(TabReplace = "    ", UseBR = false)
    Hljs.Configure(hljsConfig)
    Hljs.InitHighlightingOnLoad()
        
    

JavaScript:

        
int x = 6;
for(int i = 0; i < 10; ++i){
    if(x < 120){
        x = x * 3;
    }
    else{
        x = x - 10;
    }
    std::cout << x << std::endl;
}