Description Usage Arguments Details Examples
Restore paragraphs in a character vector.
1 2 | restore_paragraphs(x, skipRegexCurrent = "^\\s*[•A-Z(]",
skipRegexPrevious = "[\\.?!)]\\s*$")
|
x |
a character vector |
skipRegexCurrent |
a regex |
skipRegexPrevious |
another regex |
Reconstruct paragraphs from a character vector with line breaks and word-wraps. The heuristic is as follows: If a line ends with a hyphenation and the next line starts with a small letter, remove hyphen and concatenate word."
1 2 3 4 5 6 | vec <- c(
"This is a sample text. We freq-",
"quently encounter issues with bro-",
"ken lines."
)
restore_paragraphs(vec)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.