Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

run slidify with KnitHTML only if YAML front matter is found.

  • Loading branch information...
commit a37c7e5381acff43792fb2f1cf6b00563b644582 1 parent 7264e2e
@ramnathv authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 R/zzz.R
View
9 R/zzz.R
@@ -1,6 +1,11 @@
.onLoad <- function(libname, pkgname){
- options(rstudio.markdownToHTML =
+ options(rstudio.markdownToHTML =
function(inputFile, outputFile) {
- slidify(inputFile, outputFile, knit_deck = FALSE)
+ if (readLines(inputFile)[1] == '---'){
+ slidify(inputFile, outputFile, knit_deck = FALSE)
+ } else {
+ require(markdown)
+ markdownToHTML(inputFile, outputFile)
+ }
})
}
Please sign in to comment.
Something went wrong with that request. Please try again.