Merge pull request #30 from mdlerch/slidelevel

Interpret slide_level in YAML
diff --git a/R/revealjs_presentation.R b/R/revealjs_presentation.R
index 541cf3f..6af3dc2 100644
--- a/R/revealjs_presentation.R
+++ b/R/revealjs_presentation.R
@@ -108,7 +108,8 @@
   args <- c(args, pandoc_variable_arg("center", jsbool(center)))
   
   # slide level
-  args <- c(args, "--slide-level", "2")
+  if (!is.null(slide_level))
+    args <- c(args, "--slide-level", as.character(slide_level))
   
   # theme
   theme <- match.arg(theme, revealjs_themes())