aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/shortcode.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-05-15 11:40:34 +0200
committerBjørn Erik Pedersen <[email protected]>2022-05-15 20:25:25 +0200
commitfc9f315d86e1fe51c3d1eec3b60680113b2e3aa6 (patch)
tree69e8ffc4d84e8f02e0e6f098c27cda9dd3bcc544 /hugolib/shortcode.go
parent4b189d8fd93d3fa326b31d451d5594c917e6c714 (diff)
downloadhugo-fc9f315d86e1fe51c3d1eec3b60680113b2e3aa6.tar.gz
hugo-fc9f315d86e1fe51c3d1eec3b60680113b2e3aa6.zip
Improve SASS errors
Fixes #9897
Diffstat (limited to 'hugolib/shortcode.go')
-rw-r--r--hugolib/shortcode.go4
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)