shithub: hugo

Download patch

ref: 2bd9d9099db267831731ed2d2200eb09305df9fc
parent: 4b7d3e57a40214a1269eda59731aa22a8f4463dd
author: Bjørn Erik Pedersen <[email protected]>
date: Sat Nov 3 12:55:45 EDT 2018

commands: Fix recently broken error template

We need a test for this ...

--- a/commands/server_errors.go
+++ b/commands/server_errors.go
@@ -72,7 +72,7 @@
 		<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 }}