iris-reader 1.0.0

A terminal-native viewer for documents, structured data, images, PDFs, databases, and stdin.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum FencedKind {
    Code,
    Mermaid,
}

pub fn classify_fenced(language: Option<&str>) -> FencedKind {
    match language.map(str::to_ascii_lowercase).as_deref() {
        Some("mermaid") => FencedKind::Mermaid,
        _ => FencedKind::Code,
    }
}