Class MermaidContentTransformer

    • Constructor Detail

      • MermaidContentTransformer

        public MermaidContentTransformer()
    • Method Detail

      • mermaidToRawSvg

        public static java.lang.String mermaidToRawSvg​(java.lang.String mmd)
                                                throws java.io.IOException
        Parameters:
        mmd - The Mermaid as plain text.
        Returns:
        The SVG as an XML string.
        Throws:
        java.io.IOException
      • mermaidToRawSvg

        public static java.lang.String mermaidToRawSvg​(java.nio.file.Path mmd)
                                                throws java.io.IOException
        Parameters:
        mmd - The Mermaid file.
        Returns:
        The SVG as an XML string.
        Throws:
        java.io.IOException
      • mermaidToImage

        public static java.nio.file.Path mermaidToImage​(java.lang.String mmd,
                                                        java.lang.String ext)
                                                 throws java.io.IOException
        Parameters:
        mmd - The Mermaid as plain text.
        ext - The output file extension.
        Returns:
        The image as a file.
        Throws:
        java.io.IOException
      • mermaidToImage

        public static java.nio.file.Path mermaidToImage​(java.nio.file.Path mmd,
                                                        java.lang.String ext)
                                                 throws java.io.IOException
        Parameters:
        mmd - The Mermaid file.
        ext - The output file extension.
        Returns:
        The path to the output file.
        Throws:
        java.io.IOException - If invoking the CLI tool goes wrong.