Skip to content

Remove menu_separator before the first navbar item#3001

Open
DanChaltiel wants to merge 1 commit into
r-lib:mainfrom
DanChaltiel:patch-1
Open

Remove menu_separator before the first navbar item#3001
DanChaltiel wants to merge 1 commit into
r-lib:mainfrom
DanChaltiel:patch-1

Conversation

@DanChaltiel

Copy link
Copy Markdown

Hi,

This is a very minor PR to fix a very minor bug.

When the "Articles" navbar menu has sections, a separator is added before the section.

However, for the first section, this doesn't look very nice, as you can see for example on https://roxygen2.r-lib.org/:

image

The PR simply checks that the index is not 1.

Since the second argument of imap() was named index I used it, but maybe purrr::map2(navbar, seq_along(navbar), ...) would be more robust, as this might break in the case where navbar has names. I'm not familiar enough with the API to know if this can happen.

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

Successfully merging this pull request may close these issues.

1 participant