diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-05-15 11:40:34 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-05-15 20:25:25 +0200 |
commit | fc9f315d86e1fe51c3d1eec3b60680113b2e3aa6 (patch) | |
tree | 69e8ffc4d84e8f02e0e6f098c27cda9dd3bcc544 /hugolib/shortcode.go | |
parent | 4b189d8fd93d3fa326b31d451d5594c917e6c714 (diff) |
Improve SASS errors
Fixes #9897
Diffstat (limited to 'hugolib/shortcode.go')
-rw-r--r-- | hugolib/shortcode.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go index 41121700d..45d5f1ca8 100644 --- a/hugolib/shortcode.go +++ b/hugolib/shortcode.go @@ -298,7 +298,7 @@ func renderShortcode( var err error tmpl, err = s.TextTmpl().Parse(templName, templStr) if err != nil { - fe := herrors.NewFileError(err, p.File().Filename()) + fe := herrors.NewFileErrorFromName(err, p.File().Filename()) pos := fe.Position() pos.LineNumber += p.posOffset(sc.pos).LineNumber fe = fe.UpdatePosition(pos) @@ -391,7 +391,7 @@ func renderShortcode( result, err := renderShortcodeWithPage(s.Tmpl(), tmpl, data) if err != nil && sc.isInline { - fe := herrors.NewFileError(err, p.File().Filename()) + fe := herrors.NewFileErrorFromName(err, p.File().Filename()) pos := fe.Position() pos.LineNumber += p.posOffset(sc.pos).LineNumber fe = fe.UpdatePosition(pos) |