3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Mermaid記法でコメントを書く方法

3
Posted at

Mermaid記法でのコメントの書き方

コメントを残すには、%%(パーセント記号2つ)を使用します。行の中で %% 以降に書かれたテキストはすべてコメントとして扱われ、実際の図形としては描画されません。

記述例
    %% これは単独行のコメントです。図には表示されません。
    A[開始] --> B(処理)
    
    B --> C{条件} %% 行の末尾にコメントを書くこともできます
    
    %% 条件分岐の処理
    C -->|Yes| D[終了]
    C -->|No| B

活用ポイント

  • 処理のメモ書き: 複雑な図を作るときに、どの部分のコードか分かりやすくするためのメモとして使えます。
  • コメントアウト: エラーのデバッグ時や、一時的に一部の要素を隠したいときに、その行の先頭に %% を付けるだけで簡単に無効化できます。
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?