当前位置: 动力学知识库 > 问答 > 编程问答 >

kotlin file doesn't support flowchart written by markdown?

问题描述:

I'm using kotlin to develope android app. We know kotlin uses markdown to document its code. So I try to draw a flowchart by markdown syntax as below:

/**

* Created by zhangruofan on 16-3-2.

*

* ```flow

* st=>start: Start|past:>http://www.google.com[blank]

* e=>end: End:>http://www.google.com

* op1=>operation: My Operation|past

* op2=>operation: Stuff|current

* sub1=>subroutine: My Subroutine|invalid

* cond=>condition: Yes

* or No?|approved:>http://www.baidu.com

* c2=>condition: Good idea|rejected

* io=>inputoutput: catch something...|request

*

* st->op1(right)->cond

* cond(yes, right)->c2

* cond(no)->sub1(left)->op1

* c2(yes)->io->e

* c2(no)->op2->e

* ```

*/

but the flowchart doesn't show.Some other markdown syntax such as **Bold** does work. I don't know how to make it work.

网友答案:

As Ilya said, markdown doesn't have support for flowchart construction. What you are doing is telling markdown (specifically GitHub flavored markdown in this case) to render preformatted text and highlight it according to the syntax of flow language.

If you have an environment where your above code actually shows a chart, it's custom functionality in that environment, and you shouldn't expect it anywhere else.

The markdown that Kotlin supports is documented here (basically vanilla markdown with some extensions for linking to different bits of code).

分享给朋友:
您可能感兴趣的文章:
随机阅读: