Description Usage Arguments Value Examples
View source: R/leanpub_render.R
Parse Quiz from Markua Markdown File
1 2 3 4 5 6 7 8 9 | leanpub_parse_quiz(md_file)
leanpub_parse_exercise(md_file)
leanpub_remove_quiz(md_file)
leanpub_remove_exercise(md_file)
leanpub_remove_tests(md_file)
|
md_file |
Path to manuscript file |
A character vector of quiz
1 2 3 4 5 6 7 8 9 10 11 | md_file = system.file("extdata", "00_template.md",
package = "didactr")
if (file.exists(md_file)) {
res = leanpub_parse_quiz(md_file)
stopifnot(length(res) > 0)
res = leanpub_parse_exercise(md_file)
stopifnot(length(res) == 0)
tfile = leanpub_remove_tests(md_file)
res = leanpub_parse_quiz(tfile)
stopifnot(length(res) == 0)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.