#markdown-text #markdown #tui #ratatui #terminal #cli

tui-markdown

A simple library for converting markdown to a Rataui Text value

16 releases

0.3.0 Nov 20, 2024
0.2.10 Sep 20, 2024
0.2.6 Jun 24, 2024
0.2.2 Mar 2, 2024

#880 in Command-line interface

Download history 140/week @ 2024-08-31 13/week @ 2024-09-07 311/week @ 2024-09-14 74/week @ 2024-09-21 94/week @ 2024-09-28 8/week @ 2024-10-05 172/week @ 2024-10-12 210/week @ 2024-10-19 485/week @ 2024-10-26 352/week @ 2024-11-02 124/week @ 2024-11-09 203/week @ 2024-11-16 88/week @ 2024-11-23 161/week @ 2024-11-30 135/week @ 2024-12-07

592 downloads per month
Used in markdown-reader

MIT/Apache

31KB
637 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

Initial implementation - this is very much WIP (see lib.rs todo!()s)

  • 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

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
~208K SLoC