"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "resources/resource_transformers/tocss/dartsass/transform.go" between
hugo-0.85.0.tar.gz and hugo-0.86.0.tar.gz

About: Hugo is a static site generator that takes a source directory of Markdown files and templates and uses these as input to create a complete website (written in Go).

transform.go  (hugo-0.85.0):transform.go  (hugo-0.86.0)
skipping to change at line 93 skipping to change at line 93
c: t.c, c: t.c,
}, },
OutputStyle: godartsass.ParseOutputStyle(opts.OutputStyle), OutputStyle: godartsass.ParseOutputStyle(opts.OutputStyle),
EnableSourceMap: opts.EnableSourceMap, EnableSourceMap: opts.EnableSourceMap,
} }
// Append any workDir relative include paths // Append any workDir relative include paths
for _, ip := range opts.IncludePaths { for _, ip := range opts.IncludePaths {
info, err := t.c.workFs.Stat(filepath.Clean(ip)) info, err := t.c.workFs.Stat(filepath.Clean(ip))
if err == nil { if err == nil {
filename := info.(hugofs.FileMetaInfo).Meta().Filename() filename := info.(hugofs.FileMetaInfo).Meta().Filename
args.IncludePaths = append(args.IncludePaths, filename) args.IncludePaths = append(args.IncludePaths, filename)
} }
} }
if ctx.InMediaType.SubType == media.SASSType.SubType { if ctx.InMediaType.SubType == media.SASSType.SubType {
args.SourceSyntax = godartsass.SourceSyntaxSASS args.SourceSyntax = godartsass.SourceSyntaxSASS
} }
res, err := t.c.toCSS(args, ctx.From) res, err := t.c.toCSS(args, ctx.From)
if err != nil { if err != nil {
skipping to change at line 194 skipping to change at line 194
namePatterns = []string{"_%s.scss", "%s.scss", "_%s.sass", "%s.sa ss"} namePatterns = []string{"_%s.scss", "%s.scss", "_%s.sass", "%s.sa ss"}
} }
name = strings.TrimPrefix(name, "_") name = strings.TrimPrefix(name, "_")
for _, namePattern := range namePatterns { for _, namePattern := range namePatterns {
filenameToCheck := filepath.Join(basePath, fmt.Sprintf(namePatter n, name)) filenameToCheck := filepath.Join(basePath, fmt.Sprintf(namePatter n, name))
fi, err := t.c.sfs.Fs.Stat(filenameToCheck) fi, err := t.c.sfs.Fs.Stat(filenameToCheck)
if err == nil { if err == nil {
if fim, ok := fi.(hugofs.FileMetaInfo); ok { if fim, ok := fi.(hugofs.FileMetaInfo); ok {
return "file://" + filepath.ToSlash(fim.Meta().Fi lename()), nil return "file://" + filepath.ToSlash(fim.Meta().Fi lename), nil
} }
} }
} }
// Not found, let Dart Dass handle it // Not found, let Dart Dass handle it
return "", nil return "", nil
} }
func (t importResolver) Load(url string) (string, error) { func (t importResolver) Load(url string) (string, error) {
filename, _ := urlToFilename(url) filename, _ := urlToFilename(url)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)