Add line numbers
This commit is contained in:
parent
2e3b194bcd
commit
a8b31ce373
2
main.go
2
main.go
|
@ -66,7 +66,7 @@ func pasteHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
check(err)
|
check(err)
|
||||||
|
|
||||||
if param2 != "" {
|
if param2 != "" {
|
||||||
highlight := pygments.Highlight(string(s), param2, "html", "full, style=autumn,", "utf-8")
|
highlight := pygments.Highlight(string(s), param2, "html", "full, style=autumn,linenos=True, lineanchors=True,anchorlinenos=True,", "utf-8")
|
||||||
io.WriteString(w, string(highlight))
|
io.WriteString(w, string(highlight))
|
||||||
} else {
|
} else {
|
||||||
io.WriteString(w, string(s))
|
io.WriteString(w, string(s))
|
||||||
|
|
Loading…
Reference in New Issue