summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resource/tocss/scss/tocss.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/resource/tocss/scss/tocss.go b/resource/tocss/scss/tocss.go
index d606e9832..ec4685d87 100644
--- a/resource/tocss/scss/tocss.go
+++ b/resource/tocss/scss/tocss.go
@@ -19,6 +19,7 @@ import (
"fmt"
"io"
"path"
+ "path/filepath"
"strings"
"github.com/bep/go-tocss/scss"
@@ -84,6 +85,10 @@ func (t *toCSSTransformation) Transform(ctx *resource.ResourceTransformationCtx)
sourcePath = strings.TrimPrefix(sourcePath, t.c.rs.WorkingDir+helpers.FilePathSeparator)
}
+ // This needs to be Unix-style slashes, even on Windows.
+ // See https://github.com/gohugoio/hugo/issues/4968
+ sourcePath = filepath.ToSlash(sourcePath)
+
// This is a workaround for what looks like a bug in Libsass. But
// getting this resolution correct in tools like Chrome Workspaces
// is important enough to go this extra mile.