View source: R/liquid_to_commonmark.R
liquid_to_commonmark | R Documentation |
Liquid code blocks are generally codified by
liquid_to_commonmark(block, make_rmd = FALSE)
block |
a code block |
make_rmd |
if |
print("code goes " + "here")
: .language-python
However, there is a simpler syntax that we can use:
print("code goes " + "here")
This will take in a code block and convert it so that it will no longer use the liquid tag (which we have added as a "ktag" attribute for "kramdown" tag)
the node, invisibly.
frg1 <- Lesson$new(lesson_fragment())
frg2 <- frg1$clone(deep = TRUE)
py1 <- get_code(frg1$episodes[["17-scope.md"]]$body, ".language")
py2 <- get_code(frg2$episodes[["17-scope.md"]]$body, ".language")
py1
invisible(lapply(py1, liquid_to_commonmark, make_rmd = FALSE))
invisible(lapply(py2, liquid_to_commonmark, make_rmd = TRUE))
py1
py2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.