diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-11-03 16:55:45 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-11-03 16:55:45 +0100 |
commit | 2bd9d9099db267831731ed2d2200eb09305df9fc (patch) | |
tree | 280c33307ff2b81dba7901365aa6283063c7ba1e /commands/server_errors.go | |
parent | 4b7d3e57a40214a1269eda59731aa22a8f4463dd (diff) | |
download | hugo-2bd9d9099db267831731ed2d2200eb09305df9fc.tar.gz hugo-2bd9d9099db267831731ed2d2200eb09305df9fc.zip |
commands: Fix recently broken error template
We need a test for this ...
Diffstat (limited to 'commands/server_errors.go')
-rw-r--r-- | commands/server_errors.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/server_errors.go b/commands/server_errors.go index 6a56a1d19..9f13c9d8c 100644 --- a/commands/server_errors.go +++ b/commands/server_errors.go @@ -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 }} |