#ratatui #markdown #spans #style #produces #widgets #termimad

ratskin

A wrapper around termimad that produces ratatui widgets from markdown

2 unstable releases

0.2.0 Jan 25, 2025
0.1.0 Jan 25, 2025

#3 in #produces

Download history 216/week @ 2025-01-21 74/week @ 2025-01-28 48/week @ 2025-02-04 15/week @ 2025-02-11

353 downloads per month
Used in 2 crates

MIT license

14KB
250 lines

Ratskin is a wrapper around [termimad] that parses markdown into ratatui::text::Lines.

#
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


lib.rs:

Ratskin is a wrapper around [termimad] that parses markdown into ratatui::text::Lines.

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.

Dependencies

~9–20MB
~290K SLoC