Skip to content

Commit

Permalink
Updated documentation with comment syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreywolf committed Nov 26, 2019
1 parent 4ff5c3b commit d26a672
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/classDiagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,20 @@ class Color{
}
```

## Comments

Comments can be entered within a class diagram, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text after the start of the comment to the next newline will be treated as a comment, including any class diagram syntax

```
classDiagram
%% This whole line is a comment classDiagram class Shape <<interface>>
class Shape{
<<interface>>
noOfVertices
draw()
}
```

## Styling

Expand Down
10 changes: 10 additions & 0 deletions docs/flowchart.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,16 @@ Beginners tip, a full example using interactive links in a html context:
</body>
```

### Comments

Comments can be entered within a flow diagram, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text after the start of the comment to the next newline will be treated as a comment, including any flow syntax

```
graph LR
%% this is a comment A -- text --> B{node}
A -- text --> B -- text2 --> C
```

## Styling and classes

### Styling links
Expand Down
17 changes: 17 additions & 0 deletions docs/gantt.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,23 @@ More info in: http://momentjs.com/docs/#/parsing/string-format/

More info in: https://github.com/mbostock/d3/wiki/Time-Formatting

## Comments

Comments can be entered within a gantt chart, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text after the start of the comment to the next newline will be treated as a comment, including any diagram syntax

```
gantt
title A Gantt Diagram
%% this is a comment
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1 , 20d
section Another
Task in sec :2014-01-12 , 12d
another task : 24d
```

## Styling

Expand Down
9 changes: 9 additions & 0 deletions docs/sequenceDiagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,16 @@ sequenceDiagram
```

## Comments

Comments can be entered within a sequence diagram, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text after the start of the comment to the next newline will be treated as a comment, including any diagram syntax

```
sequenceDiagram
Alice->>John: Hello John, how are you?
%% this is a comment
John-->>Alice: Great!
```

## Styling

Expand Down
15 changes: 15 additions & 0 deletions docs/stateDiagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,21 @@ As in plantUml you can specify concurrency using the -- symbol.
}
```

## Comments

Comments can be entered within a state diagram chart, which will be ignored by the parser. Comments need to be on their own line, and must be prefaced with `%%` (double percent signs). Any text after the start of the comment to the next newline will be treated as a comment, including any diagram syntax

```
stateDiagram
[*] --> Still
Still --> [*]
%% this is a comment
Still --> Moving
Moving --> Still %% another comment
Moving --> Crash
Crash --> [*]
```

## Styling

Styling of the a state diagram is done by defining a number of css classes. During rendering these classes are extracted from the file located at src/themes/state.scss

0 comments on commit d26a672

Please sign in to comment.