-
Notifications
You must be signed in to change notification settings - Fork 321
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
get_section_level() fails on unnumbered sections #1654
Comments
What problem does that cause? |
It makes |
I don't think that can be true because I use unnumbered sections in my books, and search works for me. |
O.k., so perhaps not every site. But on an ordinary pkgdown site created for an R package. Try for example making a heading in one of the pkgdown vignettes unnumbered, then run |
Oh this is pkgdown, not bookdown. Sorry, I got confused! |
@gustavdelius thanks for catching this! 🙏 I've opened a PR. |
oh sorry I had missed it 🤦♀️ Your regex might actually be more elegant. |
The current implementation of
get_section_level()
fails on unnumbered sections created in RMarkdown with(see https://bookdown.org/yihui/rmarkdown-cookbook/unnumbered-sections.html). This leads to
class="section level1 unnumbered
which the regular expression inget_section_level()
can not deal with.The text was updated successfully, but these errors were encountered: