{"id":19284870,"url":"https://github.com/lorenzwalthert/stylermd","last_synced_at":"2025-04-22T03:32:26.667Z","repository":{"id":89377174,"uuid":"96419436","full_name":"lorenzwalthert/stylermd","owner":"lorenzwalthert","description":"Make markdown or plain text fit 80 characters. Or any limit you want.","archived":true,"fork":false,"pushed_at":"2019-04-04T07:32:53.000Z","size":100,"stargazers_count":21,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T21:31:50.209Z","etag":null,"topics":["formatting","line-width","styler"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorenzwalthert.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-06T10:38:04.000Z","updated_at":"2024-07-08T10:53:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f704e70-20be-4c5c-902f-27588a5545ce","html_url":"https://github.com/lorenzwalthert/stylermd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzwalthert%2Fstylermd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzwalthert%2Fstylermd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzwalthert%2Fstylermd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzwalthert%2Fstylermd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorenzwalthert","download_url":"https://codeload.github.com/lorenzwalthert/stylermd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250167611,"owners_count":21386004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formatting","line-width","styler"],"created_at":"2024-11-09T21:40:18.566Z","updated_at":"2025-04-22T03:32:26.653Z","avatar_url":"https://github.com/lorenzwalthert.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n# Style your markdown\n\n[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)\n[![Travis build\nstatus](https://travis-ci.org/lorenzwalthert/stylermd.svg?branch=master)](https://travis-ci.org/lorenzwalthert/stylermd)\n[![AppVeyor build\nstatus](https://ci.appveyor.com/api/projects/status/github/lorenzwalthert/stylermd?branch=master\u0026svg=true)](https://ci.appveyor.com/project/lorenzwalthert/stylermd)\n\n\u003e Just keep up one rule: 80 characters per line. I promise it will take 80% of\nyour time. -- \u003ccite\u003eLorenz Walthert\u003c/cite\u003e\n\nThe main motivation for creating this package was because when working with\nbookdown / blogdown or Rmarkdown in general, I spent **way too much time** just\nkeeping up the 80 character width rule as every word you add or remove in a\nparagraph affects all subsequent lines.\n\n**Functionality**\n\nThis package is similar to styler, but it styles non-code elements and files and\nit does really just one thing: Making every line at most 80 characters, or a\ncustom line width you can set with the option `stylermd.line_width`, i.e.\n`options(stylermd.line_width = 60)`. It supports:\n\n* Both adding and removing line breaks for float text, nested enumerations and \n  bullet lists.\n* Files with and without code chunks (any extension).\n* Ignoring code chunks and latex equations.\n* Files with YAML Header.\n* Preserves paragraphs.\n\nYou can install it from GitHub:\n\n```{r, eval = FALSE}\nremotes::install_github(\"lorenzwalthert/stylermd\")\n``` \n\n**API**\n\nYou can use:\n\n* `tidy_text()`.\n* `tidy_file()`.\n* the RStudio Addins (restarting RStudio after installation). One styles the\n  highlighted text, the other styles the active file, remembering the cursor\n  position. Set the environment variable `save_after_styling` to `TRUE`, for\n  example in your `.Rprofile` to enable saving after styling. Hint: Assign a\n  keyboard short-cut for the Addin with *Menu -\u003e Tools -\u003e Modify Keyboard\n  Shortcuts* for most productive use.\n\n**Example**\n\n```{r, comment = \"\"}\nlibrary(magrittr)\ntext \u003c- \"1. introduced above. We do this by first creating a style guide with the designated wrapper function `create_style_guide()`. It takes transformer\"\nstylermd::tidy_text(text) %\u003e%\n  cat(sep = \"\\n\")\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzwalthert%2Fstylermd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florenzwalthert%2Fstylermd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzwalthert%2Fstylermd/lists"}