mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
tocss: Fix the import resolving from absolute to relative assets paths
Fixes #12137
This commit is contained in:
@@ -144,7 +144,7 @@ func (t importResolver) CanonicalizeURL(url string) (string, error) {
|
||||
var pathDir string
|
||||
if isURL {
|
||||
var found bool
|
||||
prevDir, found = t.c.sfs.MakePathRelative(filepath.Dir(filePath), false)
|
||||
prevDir, found = t.c.sfs.MakePathRelative(filepath.Dir(filePath), true)
|
||||
|
||||
if !found {
|
||||
// Not a member of this filesystem, let Dart Sass handle it.
|
||||
|
@@ -86,7 +86,7 @@ func (t *toCSSTransformation) Transform(ctx *resources.ResourceTransformationCtx
|
||||
if prev == "stdin" {
|
||||
prevDir = baseDir
|
||||
} else {
|
||||
prevDir, _ = t.c.sfs.MakePathRelative(filepath.Dir(prev), false)
|
||||
prevDir, _ = t.c.sfs.MakePathRelative(filepath.Dir(prev), true)
|
||||
|
||||
if prevDir == "" {
|
||||
// Not a member of this filesystem. Let LibSASS handle it.
|
||||
|
Reference in New Issue
Block a user