Skip to content

Commit

Permalink
make regex a little stricter so it won't match rmarkdown::
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Apr 3, 2024
1 parent 6d48fec commit 28ef45f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/utils-conversion.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ knit2html = function(
is_rmd_v2 = function(input, text = read_utf8(input)) {
res = xfun::yaml_body(text)$yaml[['output']]
if (is.list(res)) res = names(res)
length(res) > 0 && is.character(res) && !any(grepl('(mark|lite)down::', res))
length(res) > 0 && is.character(res) && !any(grepl('^(mark|lite)down::', res))
}

#' Knit an R Markdown document and post it to WordPress
Expand Down

0 comments on commit 28ef45f

Please sign in to comment.