From 84b51792d66dda491bc8652a75c16a293bd5ca07 Mon Sep 17 00:00:00 2001 From: ScriptBloom <1774113002@qq.com> Date: Sat, 13 Jul 2024 02:33:05 +0800 Subject: [PATCH] docs: fix the classDef example in stateDiagram not display as code block, and long text display overflows --- docs/syntax/stateDiagram.md | 10 +++++----- packages/mermaid/src/docs/syntax/stateDiagram.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/syntax/stateDiagram.md b/docs/syntax/stateDiagram.md index a6b06a4b73..e532678f0a 100644 --- a/docs/syntax/stateDiagram.md +++ b/docs/syntax/stateDiagram.md @@ -483,8 +483,8 @@ a _[valid CSS property name](https://www.w3.org/TR/CSS/#properties)_ followed by Here is an example of a classDef with just one property-value pair: -``` - classDef movement font-style:italic; +```txt +classDef movement font-style:italic; ``` where @@ -496,8 +496,8 @@ If you want to have more than one _property-value pair_ then you put a comma (`, Here is an example with three property-value pairs: -``` - classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow +```txt +classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow ``` where @@ -522,7 +522,7 @@ There are two ways to apply a `classDef` style to a state: A `class` statement tells Mermaid to apply the named classDef to one or more classes. The form is: ```txt - class [one or more state names, separated by commas] [name of a style defined with classDef] +class [one or more state names, separated by commas] [name of a style defined with classDef] ``` Here is an example applying the `badBadEvent` style to a state named `Crash`: diff --git a/packages/mermaid/src/docs/syntax/stateDiagram.md b/packages/mermaid/src/docs/syntax/stateDiagram.md index a287d41682..9d99ab93b9 100644 --- a/packages/mermaid/src/docs/syntax/stateDiagram.md +++ b/packages/mermaid/src/docs/syntax/stateDiagram.md @@ -288,8 +288,8 @@ a _[valid CSS property name](https://www.w3.org/TR/CSS/#properties)_ followed by Here is an example of a classDef with just one property-value pair: -``` - classDef movement font-style:italic; +```txt +classDef movement font-style:italic; ``` where @@ -301,8 +301,8 @@ If you want to have more than one _property-value pair_ then you put a comma (`, Here is an example with three property-value pairs: -``` - classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow +```txt +classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow ``` where @@ -327,7 +327,7 @@ There are two ways to apply a `classDef` style to a state: A `class` statement tells Mermaid to apply the named classDef to one or more classes. The form is: ```txt - class [one or more state names, separated by commas] [name of a style defined with classDef] +class [one or more state names, separated by commas] [name of a style defined with classDef] ``` Here is an example applying the `badBadEvent` style to a state named `Crash`: