summaryrefslogtreecommitdiffstats
path: root/tpl/resources/resources.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-27 17:01:35 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-27 18:38:44 +0200
commit46a2ea6d0d3aba04213362fc72f5a3a28e3c3404 (patch)
tree02b304fdb8ceaf7bfd5c54f1c4421a734e8b8ffd /tpl/resources/resources.go
parent653ab2cc1f97df8f05c466e1d757e1c81fcc58f8 (diff)
postcss: Make the resource cache key more stable
By using the input map as the basis, which means the hash will not change if we add/rename/remove options. This happened in Hugo 0.99, as we added a new options. This is unortunate. Unfortunately this means that the cache keys for PostCSS will change one more time in 0.100, but will be stable going forward. Note that we have implemented this pattern in all the other resource transformers. Updates #9787
Diffstat (limited to 'tpl/resources/resources.go')
-rw-r--r--tpl/resources/resources.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/tpl/resources/resources.go b/tpl/resources/resources.go
index 165152c78..428e36c92 100644
--- a/tpl/resources/resources.go
+++ b/tpl/resources/resources.go
@@ -405,15 +405,8 @@ func (ns *Namespace) PostCSS(args ...any) (resource.Resource, error) {
if err != nil {
return nil, err
}
- var options postcss.Options
- if m != nil {
- options, err = postcss.DecodeOptions(m)
- if err != nil {
- return nil, err
- }
- }
- return ns.postcssClient.Process(r, options)
+ return ns.postcssClient.Process(r, m)
}
func (ns *Namespace) PostProcess(r resource.Resource) (postpub.PostPublishedResource, error) {