]> git.maquefel.me Git - brevno-suite/hugo/commit
Fix HasMenuCurrent and IsDescendant/IsAncestor when comparing to itself
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 25 May 2022 16:46:42 +0000 (18:46 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 28 May 2022 08:56:54 +0000 (10:56 +0200)
commit3b478f50b7408ad78d085fa6dbc3c7a683c9d943
tree1a2250fc8686beee6ee1d999a0d158f1edbbfe4c
parentf343b8eb7877c857c23dd5f0b554024b7682de3a
Fix HasMenuCurrent and IsDescendant/IsAncestor when comparing to itself

There may be sites in the wild that depends on the faulty behaviour of IsDescendant/IsAncestor when comparing to itself, but

* The documentation and common sense says that a thing cannot be descendant or ancestor to itself.
* The bug introduced in `HasMenuCurrent` comes directly from that confusion.

Fixes #9846
hugolib/content_map_test.go
hugolib/menu_test.go
hugolib/page__tree.go