| Crates.io | ratskin |
| lib.rs | ratskin |
| version | 0.2.0 |
| created_at | 2025-01-25 09:25:37.700578+00 |
| updated_at | 2025-01-25 10:35:18.841879+00 |
| description | A wrapper around termimad that produces ratatui widgets from markdown |
| homepage | https://github.com/benjajaja/ratskin |
| repository | https://github.com/benjajaja/ratskin |
| max_upload_size | |
| id | 1530478 |
| size | 15,118 |
Ratskin is a wrapper around [termimad] that parses markdown into [ratatui::text::Line]s.
#
let rat_skin = RatSkin::default();
let text = RatSkin::parse_text("**cook it!**");
let lines: Vec<Line> = rat_skin.parse(text, 80);
assert_eq!(lines, vec![Line::from(Span::from("cook it!").bold())]);
This is all you need to know about Ratskin - for everything else, please see termimad:
Because termimad is very streamlined for writing terminal output directly (for good reasons), a small part of the logic had to be rewritten for ratatui Spans and Lines.
License: MIT