Skip to content

Commit

Permalink
Now get_section_level() works also with unnumbered sections, fixing r…
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavdelius committed Apr 30, 2021
1 parent b94fe34 commit 1be9934
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/utils.r
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ remove_useless_parts <- function(links, pkg) {

get_section_level <- function(section) {
as.numeric(
sub(
".*section level", "",
gsub(
".*section level(\\d+).*", '\\1',
xml2::xml_attr(section, "class")
)
)
Expand Down

0 comments on commit 1be9934

Please sign in to comment.