Skip to content

union, complement, symdiff, and intersect not working with resource collections #13181

Closed
@rnwst

Description

@rnwst

Description

As per the title, the set methods provided for collections do not seem to work with global resources. For example:

{{- $styles := resources.Match "css/**.css" }}
{{- $katex := resources.Match "css/**katex*" }}
{{- $complement := complement $katex $styles }}

Here, $complement contains all resources from $styles, not excluding those also found in $katex. The functions union, symdiff, and intersect malfunction in similar ways. intersect seems to return an empty collection, irrespective of the resource collections provided.

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.140.0+extended linux/amd64 BuildDate=unknown

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions