parse_safely | R Documentation |
Parses text safely, i.e. throws an informative error if EOL style does not match LF or indicates the exact position where the parsing failed. Note that we can only detect wrong EOL style if it occurs on the first line already.
parse_safely(text, ...)
text |
Text to parse. |
... |
Parameters passed to |
try(styler:::parse_safely("a + 3 -4 -> x\r\n glück + 1"))
# This cannot be detected as a EOL style problem because the first
# line ends as expected with \n
try(styler:::parse_safely("a + 3 -4 -> x\nx + 2\r\n glück + 1"))
styler:::parse_safely("a + 3 -4 -> \n glück + 1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.