Description Usage Arguments Value Examples
View source: R/extract_yaml_fragments.R
These function extracts all YAML fragments from a file, returning a list of character vectors containing the extracted fragments.
1 2 3 4 5 6 7 8 | extract_yaml_fragments(
text,
file,
delimiterRegEx = "^---$",
ignoreOddDelimiters = FALSE,
encoding = "UTF-8",
silent = TRUE
)
|
text, file |
As |
delimiterRegEx |
The regular expression used to locate YAML fragments. |
ignoreOddDelimiters |
Whether to throw an error (FALSE) or delete the last delimiter (TRUE) if an odd number of delimiters is encountered. |
encoding |
The encoding to use when calling |
silent |
Whether to be silent ( |
A list of character vectors, where each vector corresponds to one YAML fragment in the source file or text.
1 2 3 4 5 6 7 8 9 10 11 12 13 | extract_yaml_fragments(text="
---
First: YAML fragment
id: firstFragment
---
Outside of YAML
---
Second: YAML fragment
id: secondFragment
parentId: firstFragment
---
Also outside of YAML
");
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.