Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation macro does not recognize explicit false for sub_path #2023

Open
SirNate0 opened this issue Dec 22, 2023 · 2 comments
Open

Navigation macro does not recognize explicit false for sub_path #2023

SirNate0 opened this issue Dec 22, 2023 · 2 comments

Comments

@SirNate0
Copy link

Describe the bug
The Navigation macro's final parameter full_path is false by default. However, specifying it as false explicitly gives the same result as setting it to true.

Expected behavior
<<Navigation(Title, subdir, false)>> should behave the same as <<Navigation(Title, subdir)>> (which does have the correct behavior of not including the full path), rather than behaving like <<Navigation(Title, subdir, true)>> (which shows subdir in the path).

Environment Info

Gollum 5.3.2
Running on: x86_64-linux-gnu with Ruby version 3.0.2
Using:
rugged 1.7.1
gollum-rugged_adapter 2.1.0
gollum-lib 5.2.4
Markdown rendering gem: kramdown
Other renderering gems:
none
@benjaminwil
Copy link
Member

Thanks for reporting!

If you (or anyone reading this) would provide step-by-step instructions for reproduction and describe the output vs. the expected output, that would help developers easily reproduce this issue and make it more straightforward to start fixing the issue.

I haven't tried reproducing this myself, yet, but I would assume we need at least one page in a subdirectory to reproduce?

@SirNate0
Copy link
Author

SirNate0 commented Jan 17, 2024

I would imagine so, otherwise you would have nothing printed and would be unable to see whether the subdirectory is printed or not. This works for me to reproduce the issue:

  • Home.md
    <<Navigation("With False", "Test", false)>>
    
    <<Navigation("With True", "Test", true)>>
    
    <<Navigation("With Nothing", "Test")>>
  • Test/dA/A.md
    Some text
  • Test/dA/B.md
    Other text
  • Test/dB/B.md
    Other text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants