[] VScode use VScode to write markdown timing diagram

  • Ready to work
  1. Download plugin Markdown Preview Enhanced plug-in in VScode
  2. Create a file .md
  3. Open the file in VScode, the inner interface, right-click can see the Open preview to the side (there are many ways can be found to the outside), you can preview the effect in real time
  • Start markdown

The first line must be the main title, or syntax error:

     # headline 

     (Note the space)

  • Timing diagram
  1. Flag timing diagram
    ```sequence
    
    ```
  2. Add title and actor in the sequence in
    ```sequence
    title:communication
    
    participant main
    participant FuncA as A
    participant FuncB as B
    
    ```

  3. actor interaction A-> B: 

    Interaction must colon, otherwise there will be error in VScode. I do not know why QAQ

    Other syntax (common) :

    A-->B:

    A-->>B:

    Note right of A:

    Note left of A:

    Note over A:


Application example timing chart:    

# jsFunction

```sequence
title:communication

participant main
participant FuncA as A
participant FuncB as B

A-->B:
B->main:sendmessage
Note over A:NOTE_A
Note right of B:NOTE_B

```

 

    

    

 

Guess you like

Origin www.cnblogs.com/fishsoup/p/11057463.html