ariel-rs 0.2.0

A faithful Rust port of Mermaid JS — headless SVG diagram rendering without a browser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Parser for the info diagram.
//! Grammar: `info` optionally followed by `showInfo`

/// Parsed info diagram (no fields needed — version comes from the renderer).
#[derive(Debug, Default)]
pub struct InfoDiagram {
    /// Whether `showInfo` was present (currently unused in rendering).
    #[allow(dead_code)]
    pub show_info: bool,
}

/// Parse an info diagram from Mermaid text.
pub fn parse(input: &str) -> InfoDiagram {
    let show_info = input.lines().any(|l| l.trim() == "showInfo");
    InfoDiagram { show_info }
}