Skip to content

Commit

Permalink
Fix 0-length bug in make_label
Browse files Browse the repository at this point in the history
  • Loading branch information
hughjonesd committed Feb 15, 2024
1 parent febabca commit 5abed6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/aaa-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ make_label <- function (ht) {

has_knitr <- requireNamespace("knitr", quietly = TRUE)
chunk_label <- if (has_knitr) knitr::opts_current$get("label") else NULL
if (grepl("^unnamed-chunk", chunk_label)) chunk_label <- NULL
if (length(chunk_label) > 0 && grepl("^unnamed-chunk", chunk_label)) {
chunk_label <- NULL
}

if (is.na(lab) &&
getOption("huxtable.autolabel", TRUE) &&
Expand Down

0 comments on commit 5abed6c

Please sign in to comment.