prose_index | R Documentation |
Filter out the indices of lines between code block fences such as ```
(could be three or four or more backticks).
prose_index(x, warn = TRUE)
x |
A character vector of text in Markdown. |
warn |
Whether to emit a warning when code fences are not balanced. |
An integer vector of indices of lines that are prose in Markdown.
If the code fences are not balanced (e.g., a starting fence without an ending fence), this function will treat all lines as prose.
library(xfun)
prose_index(c("a", "```", "b", "```", "c"))
prose_index(c("a", "````", "```r", "1+1", "```", "````", "c"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.