hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 2bd9d9099db267831731ed2d2200eb09305df9fc
parent 4b7d3e57a40214a1269eda59731aa22a8f4463dd
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Sat,  3 Nov 2018 16:55:45 +0100

commands: Fix recently broken error template

We need a test for this ...

Diffstat:
Mcommands/server_errors.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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 }}