Style your markdown

lifecycle Travis build
status AppVeyor build
status

Just keep up one rule: 80 characters per line. I promise it will take 80% of your time. -- Lorenz Walthert

The main motivation for creating this package was because when working with bookdown / blogdown or Rmarkdown in general, I spent way too much time just keeping up the 80 character width rule as every word you add or remove in a paragraph affects all subsequent lines.

Functionality

This package is similar to styler, but it styles non-code elements and files and it does really just one thing: Making every line at most 80 characters, or a custom line width you can set with the option stylermd.line_width, i.e. options(stylermd.line_width = 60). It supports:

You can install it from GitHub:

remotes::install_github("lorenzwalthert/stylermd")

API

You can use:

Example

library(magrittr)
text <- "1. introduced above. We do this by first creating a style guide with the designated wrapper function `create_style_guide()`. It takes transformer"
stylermd::tidy_text(text) %>%
  cat(sep = "\n")


lorenzwalthert/stylermd documentation built on May 5, 2019, 1:36 a.m.