#tui #markdown #ratatui #terminal-text

tui-markdown

A simple library for converting markdown to a Rataui Text value

19 releases

0.3.3 Mar 12, 2025
0.3.1 Dec 17, 2024
0.3.0 Nov 20, 2024
0.2.6 Jun 24, 2024
0.2.2 Mar 2, 2024

#623 in Command-line interface

Download history 94/week @ 2024-11-27 155/week @ 2024-12-04 215/week @ 2024-12-11 416/week @ 2024-12-18 127/week @ 2024-12-25 590/week @ 2025-01-01 756/week @ 2025-01-08 475/week @ 2025-01-15 592/week @ 2025-01-22 368/week @ 2025-01-29 344/week @ 2025-02-05 387/week @ 2025-02-12 831/week @ 2025-02-19 805/week @ 2025-02-26 1027/week @ 2025-03-05 517/week @ 2025-03-12

3,245 downloads per month
Used in 4 crates

MIT/Apache

33KB
670 lines

Tui-markdown

An experimental Proof of Concept library for converting markdown content to a Ratatui Text value. See Markdown-reader for an example application that uses this library.

Crate badge Docs.rs Badge Deps.rs Badge License Badge Codecov.io Badge Discord Badge

GitHub Repository · API Docs · [Examples] · Changelog · Contributing

Installation

cargo add tui-markdown

Usage

let input = "# Heading\n\n**bold**"; // this can come from whereever
let text = tui_markdown::from_str(input);
text.render(area, &mut buf);

Status

This is working code, but not every markdown feature is supported. PRs welcome!

  • Headings
  • Heading attributes / classes / anchors
  • Normal paragraphs
  • Block quotes
  • Nested block quotes
  • Bold (strong)
  • Italic (emphasis)
  • Strikethrough
  • Ordered lists
  • Unordered lists
  • Code blocks
  • Html
  • Footnotes
  • Tables
  • Linebreak handling
  • Rule
  • Tasklists
  • Links
  • Images
  • Metadata blocks
  • Superscript
  • Subscript

License

Copyright (c) 2024 Josh McKinney

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See CONTRIBUTING.md.

Dependencies

~8–17MB
~207K SLoC