I have pygment installed on the server, but it renders poorly, for example, for a go program:
{{% highlight go %}}
package main
import (
"flag"
"html/template"
"io/ioutil"
"log"
"net/http"
"regexp"
"net"
)
...
http.ListenAndServe(":8080", nil)
}
{{% /highlight %}}
I see HTML <p>
tags being added in the rendered code:
<p>package main</p>
<p>import (
“flag”
“html/template”
“io/ioutil”
“log”
“net/http”
“regexp”
“net”
)</p>
Now, I was trying to use highlight.js and added the reference to it in the template’s <head>
. But I think server-side highlighting is overriding it.
How can I switch to client side highlighting?