Skip to main content

Crate rustdown_md

Crate rustdown_md 

Source
Expand description

rustdown-md — a custom Markdown preview renderer for egui.

Renders parsed Markdown (via pulldown-cmark) directly into egui widgets, supporting configurable heading colours/sizes and viewport-culled scrolling.

Structs§

HeadingStyle
Per-heading-level style: font scale relative to body and colour.
ListItem
A single list item (may contain nested blocks).
MarkdownCache
Cached pre-parsed blocks, height estimates, and the source hash.
MarkdownStyle
Full style configuration for the Markdown renderer.
MarkdownViewer
The main Markdown viewer widget.
Span
An inline formatting span within a StyledText.
SpanStyle
Inline formatting flags that can be combined (e.g., bold + italic).
StyledText
Styled text: a string with inline formatting spans.
TableData
Table block data, boxed inside Block::Table to keep enum size down.

Enums§

Alignment
Alignment for table columns.
Block
A single renderable block produced by parsing.

Constants§

DARK_HEADING_COLORS
Dracula heading palette for dark themes, ordered from the primary accent (H1) down to warmer secondary accents (H6).
HEADING_FONT_SCALES
Default heading font scales (H1-H6).
LIGHT_HEADING_COLORS
Light-theme companions to the Dracula heading palette.

Functions§

bytecount_newlines
Fast newline counting via memchr.
heading_level_to_u8