#markdown-parser #ratatui #text #markdown-text #type #md

md-to-tui

simple parser from markdown to ratatui types

3 releases

0.1.2 Jun 29, 2023
0.1.1 Jun 29, 2023
0.1.0 Jun 29, 2023

#799 in Command-line interface

Download history 5/week @ 2024-12-04 8/week @ 2024-12-11 6/week @ 2024-12-18 152/week @ 2025-01-08 67/week @ 2025-01-15 157/week @ 2025-01-22 30/week @ 2025-01-29 82/week @ 2025-02-05 50/week @ 2025-02-12 101/week @ 2025-02-19 113/week @ 2025-02-26

355 downloads per month

MIT license

28KB
737 lines

md-to-tui

Rust

markdown to ratatui parser

md-to-tui is an markdown parser from md like text to ratatui types

#! its in the early stage and not evrything works for exp. bold/itlic are not working right now becouse of crude and simple implemetion at the time.

Usage

this library implements MarkdownParsable for types that implement ToString trait. You can use parse_markdown fn to parse markdown to Text. parse_markdown takes option of MdStyle and returns Result<Text<'static>, Error>

// example

let md = "
# TODO

- [ ] one
- [ ] two 

[link](http://exp.com)

"
let res = md.parse_markdown(Some(style))

Road map

  • add support for bold and italic
  • make horizontal_rule
  • color number list
  • color headings according to its size
  • maybe add support for codeblock

Dependencies

~6–19MB
~187K SLoC