1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! A [ratatui] markdown renderer with image placeholders, code blocks,
//! styled headings, lists, blockquotes, links, and more.
//!
//! # Quick start
//!
//! Parse markdown into ratatui text lines ready for a `Paragraph` widget:
//!
//! ```rust
//! use limner::{render_markdown, MarkdownStyle};
//!
//! let lines = render_markdown("# Hello **world**", &MarkdownStyle::default(), 80);
//! assert_eq!(lines.lines.len(), 1);
//! ```
//!
//! # Per-section alignment
//!
//! Every block-level element has a corresponding `*_alignment` field.
//! Set them to `Alignment::Center`, `Alignment::Right`, or `Alignment::Justify`
//! to control how that element is laid out:
//!
//! ```rust
//! use limner::{render_markdown, Alignment, MarkdownStyle};
//!
//! let style = MarkdownStyle {
//! paragraph_alignment: Alignment::Justify,
//! heading_1_alignment: Alignment::Center,
//! code_block_alignment: Alignment::Right,
//! ..MarkdownStyle::default()
//! };
//!
//! let _result = render_markdown("# Title\n\nLong paragraph here...", &style, 60);
//! ```
//!
//! See the [`MarkdownStyle`] struct and [`Alignment`] enum for all available
//! options. The [`render_markdown`] function and [`MarkdownStyle`] struct
//! for details.
pub use pulldown_cmark;
pub use ;
pub use ;