【问题标题】:Is there a way to represent a binary/non-binary tree/graph/trie like structure in a Github README.md?有没有办法在 Github README.md 中表示二叉树/非二叉树/图/trie 结构?
【发布时间】:2019-09-22 10:50:46
【问题描述】:

在我的 Githubs 存储库文档中,我想表示这样的二叉树结构:

除了使用艺术/uml 图表创建它(使用纯图像文件)之外,还有其他方法可以使用 Github 风格的降价吗?

【问题讨论】:

    标签: github markdown github-flavored-markdown


    【解决方案1】:

    不,GFM (GitHub Flavored Markdown) 单独不支持此功能。

    您需要调用第三方在线服务,例如 g.gravizo.com 才能包含文本描述中的任何图表。

    例如见TLmaK0/gravizo

    ![Alt text](https://g.gravizo.com/source/custom_mark10?https%3A%2F%2Fraw.githubusercontent.com%2FTLmaK0%2Fgravizo%2Fmaster%2FREADME.md)
    <details> 
    <summary></summary>
    custom_mark10
      digraph G {
        size ="4,4";
        main [shape=box];
        main -> parse [weight=8];
        parse -> execute;
        main -> init [style=dotted];
        main -> cleanup;
        execute -> { make_string; printf};
        init -> make_string;
        edge [color=red];
        main -> printf [style=bold,label="100 times"];
        make_string [label="make a string"];
        node [shape=box,style=filled,color=".7 .3 1.0"];
        execute -> compare;
      }
    custom_mark10
    </details>
    

    这将被生成/显示为:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-01
      • 2017-04-14
      • 1970-01-01
      • 1970-01-01
      • 2016-07-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多