Skip to content

Commit

Permalink
commands: Fix recently broken error template
Browse files Browse the repository at this point in the history
We need a test for this ...
  • Loading branch information
bep committed Nov 3, 2018
1 parent 4b7d3e5 commit 2bd9d90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/server_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 2bd9d90

Please sign in to comment.