R/utils.R

Defines functions getActiveDoc

getActiveDoc <- function() {
  fn = rstudioapi::getActiveDocumentContext()$path
  Encoding(fn) ='UTF-8'
  if (grepl('\\.[Rr]?md$', fn)) fn else ''
}
huashan/RSExpert documentation built on May 17, 2019, 9:10 p.m.