File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -727,9 +727,9 @@ html_to_markdown <- function(html) {
727
727
logger $ info(" Converting html to markdown using" , html_file , md_file )
728
728
stringi :: stri_write_lines(html , html_file )
729
729
result <- tryCatch({
730
- pandoc2 <- rmarkdown :: pandoc_version() > = " 2.0 "
731
- format <- if (pandoc2 ) " gfm" else " markdown_github"
732
- options <- if (pandoc2 ) c(" --lua-filter" , system.file(package = " languageserver" , " lua/html-to-markdown.lua" ))
730
+ pandoc_version <- rmarkdown :: pandoc_version()
731
+ format <- if (pandoc_version > = " 2.0 " ) " gfm" else " markdown_github"
732
+ options <- if (pandoc_version > = " 2.11 " ) c(" --lua-filter" , system.file(package = " languageserver" , " lua/html-to-markdown.lua" ))
733
733
rmarkdown :: pandoc_convert(html_file , to = format , output = md_file , options = options )
734
734
paste0(stringi :: stri_read_lines(md_file , encoding = " utf-8" ), collapse = " \n " )
735
735
}, error = function (e ) {
You can’t perform that action at this time.
0 commit comments