graphviz-java/src/main/java/guru/nidi/graphviz/attribute/Label.java
public static Label markdown(String value) {
        return html(replaceMd(replaceMd(replaceMd(replaceMd(replaceMd(replaceMd(replaceMd(value.replace("\n", "<br/>"),
                "\\*\\*", "b"),
                "\\*", "i"),
                "~~", "s"),
                "__", "sub"),
                "_", "u"),
                "\\^\\^", "sup"),
                "\\^", "o")
                .replaceAll("\\\\([*~_^])", "$1"));
    }
public static Label markdown(String value) {
        return html(replaceMd(replaceMd(replaceMd(replaceMd(replaceMd(replaceMd(replaceMd(value.replace("\n", "<br/>"),
                "\\*\\*", "b"),
                "\\*", "i"),
                "~~", "s"),
                "__", "sub"),
                "_", "u"),
                "\\^\\^", "sup"),
                "\\^", "o")
                .replaceAll("\\\\([*~_^])", "$1"));
    }
Create a HTML label from markdown. The following patterns are allowed:<br>
\n newline, **bold**, *italics*, ~~strike through~~, _underlined_, ^overlined^, __subscript__, ^^superscript^^.

@param value the markdown code
@return the Label