convert_newlines_to_linebreaks | R Documentation |
Replace the newline character with a line break
convert_newlines_to_linebreaks(text)
text |
A character vector |
styler:::convert_newlines_to_linebreaks("x\n2")
# a simple strsplit approach does not cover both cases
unlist(strsplit("x\n\n2", "\n", fixed = TRUE))
unlist(strsplit(c("x", "", "2"), "\n", fixed = TRUE))
styler:::convert_newlines_to_linebreaks(c("x", "2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.