mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
postcss: Fix import error handling
Note that we will now fail if `inlineImports` is enabled and we cannot resolve an import. You can work around this by either: * Use url imports or imports with media queries. * Set `skipInlineImportsNotFound=true` in the options Also get the argument order in the different NewFileError* funcs in line. Fixes #9895
This commit is contained in:
parent
c2fa0a3320
commit
4b189d8fd9
20 changed files with 159 additions and 43 deletions
|
@ -298,7 +298,7 @@ func renderShortcode(
|
|||
var err error
|
||||
tmpl, err = s.TextTmpl().Parse(templName, templStr)
|
||||
if err != nil {
|
||||
fe := herrors.NewFileError(p.File().Filename(), err)
|
||||
fe := herrors.NewFileError(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(p.File().Filename(), err)
|
||||
fe := herrors.NewFileError(err, p.File().Filename())
|
||||
pos := fe.Position()
|
||||
pos.LineNumber += p.posOffset(sc.pos).LineNumber
|
||||
fe = fe.UpdatePosition(pos)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue