Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-01 13:28:30 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-01 23:06:35 +0300
commit1d18eb0574a57c3e9f468659d076a666a3dd76f2 (patch)
tree8536aa6e8e2fc496b3b2d7b66a2e5f0110e625a6 /tpl/template.go
parent33a7b36fd42ee31dd79115ec6639bed24247332f (diff)
Add file (line/col) info to ref/relref errors
See #5371
Diffstat (limited to 'tpl/template.go')
-rw-r--r--tpl/template.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tpl/template.go b/tpl/template.go
index 913b20ed2..3225814c0 100644
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -165,14 +165,14 @@ func (t *TemplateAdapter) addFileContext(name string, inerr error) error {
// Since this can be a composite of multiple template files (single.html + baseof.html etc.)
// we potentially need to look in both -- and cannot rely on line number alone.
lineMatcher := func(m herrors.LineMatcher) bool {
- if m.FileError.LineNumber() != m.LineNumber {
+ if m.Position.LineNumber != m.LineNumber {
return false
}
if !hasMaster {
return true
}
- identifiers := t.extractIdentifiers(m.FileError.Error())
+ identifiers := t.extractIdentifiers(m.Error.Error())
for _, id := range identifiers {
if strings.Contains(m.Line, id) {