R/parts.R

Defines functions body_details end_details start_details

start_details <- function(state,summary){
  sprintf('<details %s>%s',state, summary)
}

end_details <- function(){
  paste('</details>','<br>',sep='\n')
}

body_details <- function(lang,text){
  
  if(!details_env$device){
    
    text <- sprintf('\n\n%s\n\n',text)
    
    if(!is.null(lang))
      text <- sprintf('```%s%s```',lang,text)
    
  }
    
  text
    
}

Try the details package in your browser

Any scripts or data that you put into this service are public.

details documentation built on Nov. 7, 2019, 5:09 p.m.