commands: Fix recently broken error template

We need a test for this ...
This commit is contained in:
Bjørn Erik Pedersen 2018-11-03 16:55:45 +01:00
parent 4b7d3e57a4
commit 2bd9d9099d
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -72,7 +72,7 @@ var buildErrorTemplate = `<!doctype html>
<main>
{{ highlight .Error "apl" "noclasses=true,style=monokai" }}
{{ with .File }}
{{ $params := printf "noclasses=true,style=monokai,linenos=table,hl_lines=%d,linenostart=%d" (add .LinesPos 1) (sub .LineNumber .LinesPos) }}
{{ $params := printf "noclasses=true,style=monokai,linenos=table,hl_lines=%d,linenostart=%d" (add .LinesPos 1) (sub .Position.LineNumber .LinesPos) }}
{{ $lexer := .ChromaLexer | default "go-html-template" }}
{{ highlight (delimit .Lines "\n") $lexer $params }}
{{ end }}