From 19363965adae87e8eb37eb835fa38a8453f1f1c7 Mon Sep 17 00:00:00 2001 From: Will-Low <26700668+Will-Low@users.noreply.github.com> Date: Thu, 13 Apr 2023 09:08:48 -0700 Subject: [PATCH] Updating documentation on notes for classes I was confused by the documentation on notes for a specific class. Updated the wording slightly and added an example for clarity. --- .../mermaid/src/docs/syntax/classDiagram.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/mermaid/src/docs/syntax/classDiagram.md b/packages/mermaid/src/docs/syntax/classDiagram.md index 9d3766590..f824b0bfc 100644 --- a/packages/mermaid/src/docs/syntax/classDiagram.md +++ b/packages/mermaid/src/docs/syntax/classDiagram.md @@ -403,10 +403,26 @@ click className href "url" "tooltip" ## Notes -It is possible to add notes on diagram using `note "line1\nline2"` or note for class using `note for class "line1\nline2"` +It is possible to add notes on the diagram using `note "line1\nline2"`. A note can be added for a specific class using `note for "line1\nline2"`. ### Examples +```mmd +classDiagram + note "This is a general note" + note for MyClass "This is a note for a class" + class MyClass{ + } +``` + +```mermaid +classDiagram + note "This is a general note" + note for MyClass "This is a note for a class" + class MyClass{ + } +``` + _URL Link:_ ```mmd