For an output file FOO.html
, FOO.md
should be deleted if
FOO.Rmd
exists, and FOO.html
should be deleted when
FOO.Rmarkdown
exists (because FOO.Rmarkdown
should generate
FOO.markdown
instead) or neither FOO.Rmarkdown
nor
FOO.Rmd
exists (because a plain Markdown file should not be knitted to
HTML).