🐛 fix(navigation.go): fix the condition for determining if a navigation element is active
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
The /tmp/ directory is now added to the .gitignore file to exclude it from version control. In the navigation.go file, the condition for determining if a navigation element is active has been fixed to correctly handle cases where the activeNav string matches the elPath string. The tmp/main file has been deleted.
This commit is contained in:
parent
08652832ed
commit
e4c72b348f
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
||||
/coverage.out
|
||||
/test/out
|
||||
/mark2web
|
||||
/tmp/
|
@ -55,7 +55,7 @@ func buildNavigationRecursive(tree *TreeNode, curNavMap *map[string]*NavElement,
|
||||
subMap := make(map[string]*NavElement)
|
||||
subSlice := make([]*NavElement, 0)
|
||||
navEl := NavElement{
|
||||
Active: strings.HasPrefix(activeNav, elPath),
|
||||
Active: strings.HasPrefix(activeNav, elPath+"/") || activeNav == elPath,
|
||||
Data: el.Config.Data,
|
||||
ColMap: el.ColMap,
|
||||
SubMap: &subMap,
|
||||
|
Loading…
Reference in New Issue
Block a user