detect rmarkdown extended type for unsaved Rmd documents