vjeantet / hugo-theme-casper

Casper theme ported to Hugo
MIT License
387 stars 181 forks source link

There's no "union" function, use "intersect" #109

Open mem opened 6 years ago

mem commented 6 years ago

Even if the documentation says there's an "union" function that computes the union of two sets, looking at Hugo's source code, there's no such function.

Use "intersect" instead. It's more appropriate, too, because it will eliminate duplicates in the two lists, if there are any.

Signed-off-by: Marcelo E. Magallon marcelo.magallon@gmail.com

mem commented 6 years ago

Sorry, I didn't realize I had an old hugo binary in my path :-(

But I still think it's better to use intersect than union. Would you like me to correct the commit message?

vjeantet commented 6 years ago

Are you sure the behaviour of intersect == Union ?

mceachen commented 5 years ago

The functions are absolutely not equivalent. See https://gohugo.io/functions/intersect/ and https://gohugo.io/functions/union/.