wolf-graph-mermaid 0.1.0

Adds support for generating Mermaid diagrams from wolf-graph graphs.
Documentation
//    import Foundation
//
//    public enum NodeShape: String {
//        case rectangle
//        case rounded
//        case stadium
//        case subroutine
//        case cylinder
//        case circle
//        case asymmetric
//        case rhombus
//        case hexagon
//        case parallelogram
//        case parallelogramAlt
//        case trapezoid
//        case trapezoidAlt
//        case doubleCircle
//
//        var delimiters: (String, String) {
//            switch self {
//            case .rectangle:
//                return ("[", "]")
//            case .rounded:
//                return ("(", ")")
//            case .stadium:
//                return ("([", "])")
//            case .subroutine:
//                return ("[[", "]]")
//            case .cylinder:
//                return ("[(", ")]")
//            case .circle:
//                return ("((", "))")
//            case .asymmetric:
//                return (">", "]")
//            case .rhombus:
//                return ("{", "}")
//            case .hexagon:
//                return ("{{", "}}")
//            case .parallelogram:
//                return ("[/", "/]")
//            case .parallelogramAlt:
//                return ("[\\", "\\]")
//            case .trapezoid:
//                return ("[/", "\\]")
//            case .trapezoidAlt:
//                return ("[\\", "/]")
//            case .doubleCircle:
//                return ("(((", ")))")
//            }
//        }
//    }

#[derive(Debug, Clone, PartialEq)]
pub enum NodeShape {
    Rectangle,
    Rounded,
    Stadium,
    Subroutine,
    Cylinder,
    Circle,
    Asymmetric,
    Rhombus,
    Hexagon,
    Parallelogram,
    ParallelogramAlt,
    Trapezoid,
    TrapezoidAlt,
    DoubleCircle,
}

impl NodeShape {
    pub fn delimiters(&self) -> (&'static str, &'static str) {
        match self {
            NodeShape::Rectangle => ("[", "]"),
            NodeShape::Rounded => ("(", ")"),
            NodeShape::Stadium => ("([", "])"),
            NodeShape::Subroutine => ("[[", "]]"),
            NodeShape::Cylinder => ("[(", ")]"),
            NodeShape::Circle => ("((", "))"),
            NodeShape::Asymmetric => (">", "]"),
            NodeShape::Rhombus => ("{", "}"),
            NodeShape::Hexagon => ("{{", "}}"),
            NodeShape::Parallelogram => ("[/", "/]"),
            NodeShape::ParallelogramAlt => ("[\\", "\\]"),
            NodeShape::Trapezoid => ("[/", "\\]"),
            NodeShape::TrapezoidAlt => ("[\\", "/]"),
            NodeShape::DoubleCircle => ("(((", ")))"),
        }
    }
}