feat(flowchart): support keyword flow

Closes #113
This commit is contained in:
olOwOlo 2018-12-31 20:28:27 +08:00
parent b583f811d6
commit ecb7935896
No known key found for this signature in database
GPG key ID: 456394B6E7A15EA6
7 changed files with 48 additions and 10 deletions

View file

@ -1,6 +1,6 @@
{
"even": {
"css": "even.93844dae.min.css",
"js": "even.ece58db6.min.js"
"css": "even.c2a46f00.min.css",
"js": "even.26188efa.min.js"
}
}

View file

@ -41,7 +41,7 @@ flowchartDiagrams:
## Usage
```flowchart
```flow
st=>start: Start|past:>http://www.google.com[blank]
e=>end: End:>http://www.google.com
op1=>operation: My Operation|past
@ -61,6 +61,46 @@ c2(no)->op2->e
<!--more-->
{{< highlight "linenos=table" >}}
```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.google.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
```
{{< / highlight >}}
## Legacy Usage
```flowchart
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.google.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
```
```flowchart
st=>start: Start|past:>http://www.google.com[blank]
e=>end: End:>http://www.google.com

View file

@ -221,7 +221,7 @@ Even._linkToc = function() {
Even.flowchart = function() {
if (!window.flowchart) return;
const blocks = document.querySelectorAll('pre code.language-flowchart');
const blocks = document.querySelectorAll('pre code.language-flowchart, pre code.language-flow');
for (let i = 0; i < blocks.length; i++) {
if (!window.hljs && i % 2 === 0) continue;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long