flextable_to_rmd
function ignores local chunk settings in v0.9.6 update
#631
Labels
flextable_to_rmd
function ignores local chunk settings in v0.9.6 update
#631
Hi!
First, thank you for your continuous efforts in developing this package; it's excellent!
I've recently encountered a potential bug with the
flextable_to_rmd function
in version0.9.6
. It appears that local Rmarkdown chunk options are ignored by this function, leading to potential issues. This wasn't a problem before0.9.6
.See a minimal reproducible example below where that issue causes the table not to be displayed because the local
eval
option is ignored.I suspect the issue stems from how
flextable_to_rmd
handles chunk options, possibly around lines 100-105 in the source code, where it might not properly account for local settings over global defaults. Ideally, it would respect the local chunk options setting even when the global option is set differently. Currently, theecho
option is hardcoded toFALSE
, which seems appropriate; however, other relevant options should also be considered and passed accordingly.I believe it would be beneficial if the chunk containing the flextable object could inherit the local chunk options in which it is executed. Perhaps, extracting these options from the current chunk with
knitr::opts_chunk$get(...)
or an equivalent method might resolve the issue. While it may not be necessary to pass all chunk options to the child chunk, the eval option at least should be considered.I am including my
sessionInfo()
output as advised, to provide details on my R environment and package versions.I have checked both open and closed issues and updated to the latest package version to ensure this issue is not already addressed.
Thank you for looking into this, and I appreciate any guidance or corrections if my understanding is incorrect.
The text was updated successfully, but these errors were encountered: