yarner-fold-code

Crates.ioyarner-fold-code
lib.rsyarner-fold-code
version0.2.2
sourcesrc
created_at2021-03-04 23:56:59.704914
updated_at2021-03-09 22:28:35.74102
descriptionA Yarner plugin that puts all code blocks into collapsed `
` tags
homepagehttps://github.com/mlange-42/yarner-fold-code/
repositoryhttps://github.com/mlange-42/yarner-fold-code/
max_upload_size
id363978
size13,487
Martin Lange (mlange-42)

documentation

README

yarner-fold-code

Test status GitHub Crate MIT license

A Yarner plugin that puts all code blocks into collapsed <details> tags.

Example:

All code blocks are collapsed in details tags.

Main code block
//- Main code block
fn main() {
    println!("Hello world!");
}

Installation

Binaries

  1. Download the latest binaries for your platform
  2. Unzip somewhere
  3. Add the parent directory of the executable to your PATH environmental variable

Using cargo

> cargo install yarner-fold-code

Usage

Add a section plugin.fold-code to your Yarner.toml:

[plugin.fold-code]

Options

The plugin allows for different options, which are all optional:

[plugin.fold-code]
min-lines = "10"
languages = ["java", "rust"]
ignore-languages = ["c", "python"]
Option Details Default
min-lines Do not fold code blocks shorter than that 0
languages Only fold code blocks in these languages (if present) none
ignore-languages Do not fold code blocks in these languages none
Commit count: 16

cargo fmt