Title: | RStudio Addin for Wrapping RMarkdown Paragraphs |
---|---|
Description: | Provides an RStudio addin for wrapping paragraphs in an RMarkdown document without inserting linebreaks into spans of inline R code. |
Authors: | Tristan Mahr [aut, cre], Shir Dekel [ctb] |
Maintainer: | Tristan Mahr <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9006 |
Built: | 2024-11-15 04:36:12 UTC |
Source: | https://github.com/tjmahr/WrapRmd |
Call this addin to preview output of an R markdown selection.
knit_selection_addin()
knit_selection_addin()
Wrap text but don't insert lines breaks into inline R code
str_rmd_wrap(string, width = getOption("WrapRmd.width", 80))
str_rmd_wrap(string, width = getOption("WrapRmd.width", 80))
string |
a string to wrap |
width |
desired line width. Defaults to |
This function finds all inline R code spans in a string, replaces
all non-word characters in the R spans with "Q"
s, re-wraps the
string, and restores the original inline R spans.
This function preserves blanks lines between paragraphs.
a wrapped copy of the string
Call this addin to wrap paragraphs in an R Markdown document.
wrap_rmd_addin()
wrap_rmd_addin()
The maximum line width can be set via options(WrapRmd.width)
.
Further fine tuning can be done via options “WrapRmd.smart” and
“WrapRmd.extensions”, which are passed down to
markdown_commonmark
.
Provides an RStudio addin for wrapping paragraphs in an RMarkdown document without inserting linebreaks into spans of inline R code.
Maintainer: Tristan Mahr [email protected]
Other contributors:
Shir Dekel [email protected] (ORCID) [contributor]