2 releases
0.2.2 | Mar 9, 2021 |
---|---|
0.2.1 | Mar 4, 2021 |
#9 in #literate-programming
8KB
111 lines
yarner-fold-code
A Yarner plugin that puts all code blocks into collapsed <details>
tags.
Example:
All code blocks are collapsed in details tags. Main code block
|
Installation
Binaries
- Download the latest binaries for your platform
- Unzip somewhere
- 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 |
Dependencies
~4–6MB
~108K SLoC