Skip to content

Commit

Permalink
fix: Word captions set with set_caption() can have no bookmark and …
Browse files Browse the repository at this point in the history
…have autonumber used together.

fix #527
  • Loading branch information
davidgohel committed Feb 22, 2024
1 parent 9fc8d83 commit 9fdae10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: flextable
Type: Package
Title: Functions for Tabular Reporting
Version: 0.9.5.012
Version: 0.9.5.013
Authors@R: c(
person("David", "Gohel", role = c("aut", "cre"),
email = "[email protected]"),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- `footnote()` handle undefined `ref_symbols` argument
- `delete_rows()` does not delete rows if the row selection is empty
- improve `gen_grob()` alignments when wrapping text
- Word captions set with `set_caption()` can have no bookmark and have
autonumber used together.

## Changes

Expand Down
2 changes: 1 addition & 1 deletion R/captions.R
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ has_caption <- function(x) {

has_autonum <- function(x) {
has_it <- FALSE
if (!is.null(x$caption$autonum$bookmark)) {
if (!is.null(x$caption$autonum)) {
has_it <- TRUE
}
has_it
Expand Down

0 comments on commit 9fdae10

Please sign in to comment.