diff --git a/R/lesson_to_html.R b/R/lesson_to_html.R
index 1c02a0c..e865311 100644
--- a/R/lesson_to_html.R
+++ b/R/lesson_to_html.R
@@ -8,6 +8,12 @@ makechunk_silent <- function(item) {
paste0(out, collapse="\n")
}
+makelink <- function(item) {
+ out <- c("[link](", item, ")")
+ paste0(out, collapse="\n")
+}
+
+
#' @importFrom stringr str_split str_trim
makemult <- function(item) {
answers <- unlist(str_split(item, ";"))
@@ -53,6 +59,16 @@ makemd.script <- function(unit) {
sep = "\n\n")
}
+makemd.video <- function(unit) {
+ paste(unit[['Output']],makelink(unit[['VideoLink']]),
+ sep="\n\n")
+}
+
+makemd.figure <- function(unit) {
+ paste(unit[['Output']], "Image not displayed",
+ sep="\n\n")
+}
+
#' Turn a swirl lesson into a pretty webpage
#'
#' Create an easily shareable HTML version of your swirl lesson. This function