Skip to content

Commit

Permalink
default option in quarto
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Nov 25, 2023
1 parent c170a08 commit 88ce2e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Development

* Quarto: `md` output format is recognized.
* `options(modelsummary_factory_default)` is respected, even in qmd->md documents.

# 1.4.3

Expand Down
5 changes: 4 additions & 1 deletion R/sanitize_output.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ sanitize_output <- function(output) {
# unfortunately, `rmarkdown::default_output_format` only detects
# `html_document` on reprex, so this will only work in `github_document`
## reprex and github: change to markdown output format only if `output` is "default"
} else if (any(markdown_fmt %in% fmt) && (output_user == "default")) {
} else if (any(markdown_fmt %in% fmt) &&
output_user == "default" &&
# respect global options, even in qmd->md documents
is.null(getOption("modelsummary_factory_default", default = NULL))) {
output_format <- "markdown"


Expand Down

0 comments on commit 88ce2e8

Please sign in to comment.