Skip to main content

iris_reader/renderer/markdown/
mod.rs

1mod alert;
2mod code;
3mod extensions;
4mod html;
5pub mod model;
6mod parser;
7mod render;
8mod table;
9pub(crate) mod wrap;
10
11pub use model::Document;
12
13use std::path::Path;
14
15use crate::{image::ImageManager, renderer::RenderedDocument, theme::Theme};
16
17pub fn parse(source: &str) -> Document {
18    parser::parse(source)
19}
20
21pub fn render(
22    document: &Document,
23    width: u16,
24    theme: &Theme,
25    wrap: bool,
26    tab_width: usize,
27    images: &mut ImageManager,
28    base_dir: Option<&Path>,
29) -> RenderedDocument {
30    render::render(document, width, theme, wrap, tab_width, images, base_dir)
31}