From 1481a8ccb1305b7ffb6093020682bd54c7d2d9d1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 23 Mar 2023 19:04:24 +0000 Subject: [PATCH 1/7] chore(deps): update pnpm to v7.30.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2da802bae..ca642e890 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "10.0.2", "description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "type": "module", - "packageManager": "pnpm@7.30.0", + "packageManager": "pnpm@7.30.1", "keywords": [ "diagram", "markdown", From 3add711c554422d01ba127f51bf20e5041212ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vorburger=20=E2=9B=91=EF=B8=8F?= Date: Sun, 19 Mar 2023 11:00:49 +0100 Subject: [PATCH 2/7] docs: Remove repeated phrase --- docs/syntax/timeline.md | 2 +- packages/mermaid/src/docs/syntax/timeline.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/syntax/timeline.md b/docs/syntax/timeline.md index 58b12313d..9ad27558c 100644 --- a/docs/syntax/timeline.md +++ b/docs/syntax/timeline.md @@ -8,7 +8,7 @@ > Timeline: This is an experimental diagram for now. The syntax and properties can change in future releases. The syntax is stable except for the icon integration which is the experimental part. -"A timeline is a type of diagram used to illustrate a chronology of events, dates, or periods of time. It is usually presented graphically to indicate the passing of time, and it is usually organized chronologically. A basic timeline presents a list of events in chronological order, usually using dates as markers. A timeline can also be used to show the relationship between events, such as the relationship between the events of a person's life. A timeline can also be used to show the relationship between events, such as the relationship between the events of a person's life." Wikipedia +"A timeline is a type of diagram used to illustrate a chronology of events, dates, or periods of time. It is usually presented graphically to indicate the passing of time, and it is usually organized chronologically. A basic timeline presents a list of events in chronological order, usually using dates as markers. A timeline can also be used to show the relationship between events, such as the relationship between the events of a person's life." Wikipedia ### An example of a timeline. diff --git a/packages/mermaid/src/docs/syntax/timeline.md b/packages/mermaid/src/docs/syntax/timeline.md index ef48d2b61..5036e5967 100644 --- a/packages/mermaid/src/docs/syntax/timeline.md +++ b/packages/mermaid/src/docs/syntax/timeline.md @@ -2,7 +2,7 @@ > Timeline: This is an experimental diagram for now. The syntax and properties can change in future releases. The syntax is stable except for the icon integration which is the experimental part. -"A timeline is a type of diagram used to illustrate a chronology of events, dates, or periods of time. It is usually presented graphically to indicate the passing of time, and it is usually organized chronologically. A basic timeline presents a list of events in chronological order, usually using dates as markers. A timeline can also be used to show the relationship between events, such as the relationship between the events of a person's life. A timeline can also be used to show the relationship between events, such as the relationship between the events of a person's life." Wikipedia +"A timeline is a type of diagram used to illustrate a chronology of events, dates, or periods of time. It is usually presented graphically to indicate the passing of time, and it is usually organized chronologically. A basic timeline presents a list of events in chronological order, usually using dates as markers. A timeline can also be used to show the relationship between events, such as the relationship between the events of a person's life." Wikipedia ### An example of a timeline. From 6cba2ea02d71e090d5f9f2b690a2e8105a5f92b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 23 Mar 2023 15:06:39 +0100 Subject: [PATCH 3/7] docs: fix typos in timeline.md --- docs/syntax/timeline.md | 4 ++-- packages/mermaid/src/docs/syntax/timeline.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/syntax/timeline.md b/docs/syntax/timeline.md index 58b12313d..b1a735d2e 100644 --- a/docs/syntax/timeline.md +++ b/docs/syntax/timeline.md @@ -213,7 +213,7 @@ However, if there is no section defined, then we have two possibilities: ``` -Note that this is no, section defined, and each time period and its corresponding events will have its own color scheme. +Note that there are no sections defined, and each time period and its corresponding events will have its own color scheme. 2. Disable the multiColor option using the `disableMultiColor` option. This will make all time periods and events follow the same color scheme. @@ -257,7 +257,7 @@ let us look at same example, where we have disabled the multiColor option. ### Customizing Color scheme -You can customize the color scheme using the `cScale0` to `cScale11` theme variables. Mermaid allows you to set unique colors for up-to 12, where `cScale0` variable will drive the value of the first section or time-period, `cScale1` will drive the value of the second section and so on. +You can customize the color scheme using the `cScale0` to `cScale11` theme variables. Mermaid allows you to set unique colors for up-to 12 sections, where `cScale0` variable will drive the value of the first section or time-period, `cScale1` will drive the value of the second section and so on. In case you have more than 12 sections, the color scheme will start to repeat. NOTE: Default values for these theme variables are picked from the selected theme. If you want to override the default values, you can use the `initialize` call to add your custom theme variable values. diff --git a/packages/mermaid/src/docs/syntax/timeline.md b/packages/mermaid/src/docs/syntax/timeline.md index ef48d2b61..30cc63045 100644 --- a/packages/mermaid/src/docs/syntax/timeline.md +++ b/packages/mermaid/src/docs/syntax/timeline.md @@ -139,7 +139,7 @@ However, if there is no section defined, then we have two possibilities: ``` -Note that this is no, section defined, and each time period and its corresponding events will have its own color scheme. +Note that there are no sections defined, and each time period and its corresponding events will have its own color scheme. 2. Disable the multiColor option using the `disableMultiColor` option. This will make all time periods and events follow the same color scheme. @@ -172,7 +172,7 @@ let us look at same example, where we have disabled the multiColor option. ### Customizing Color scheme -You can customize the color scheme using the `cScale0` to `cScale11` theme variables. Mermaid allows you to set unique colors for up-to 12, where `cScale0` variable will drive the value of the first section or time-period, `cScale1` will drive the value of the second section and so on. +You can customize the color scheme using the `cScale0` to `cScale11` theme variables. Mermaid allows you to set unique colors for up-to 12 sections, where `cScale0` variable will drive the value of the first section or time-period, `cScale1` will drive the value of the second section and so on. In case you have more than 12 sections, the color scheme will start to repeat. NOTE: Default values for these theme variables are picked from the selected theme. If you want to override the default values, you can use the `initialize` call to add your custom theme variable values. From 0475591fb6643f8310e0c256ad19c1407a09aa7e Mon Sep 17 00:00:00 2001 From: Kshitij Date: Sat, 25 Mar 2023 15:46:52 +0530 Subject: [PATCH 4/7] Updated render to remove comments from text --- docs/config/setup/modules/mermaidAPI.md | 2 +- packages/mermaid/src/mermaidAPI.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/config/setup/modules/mermaidAPI.md b/docs/config/setup/modules/mermaidAPI.md index 4b8f57bd7..e942a8d6d 100644 --- a/docs/config/setup/modules/mermaidAPI.md +++ b/docs/config/setup/modules/mermaidAPI.md @@ -95,7 +95,7 @@ mermaid.initialize(config); #### Defined in -[mermaidAPI.ts:659](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L659) +[mermaidAPI.ts:661](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L661) ## Functions diff --git a/packages/mermaid/src/mermaidAPI.ts b/packages/mermaid/src/mermaidAPI.ts index 1b440672a..da706d502 100644 --- a/packages/mermaid/src/mermaidAPI.ts +++ b/packages/mermaid/src/mermaidAPI.ts @@ -399,6 +399,8 @@ const render = async function ( // clean up text CRLFs text = text.replace(/\r\n?/g, '\n'); // parser problems on CRLF ignore all CR and leave LF;; + text = text.replace(/\s*%%.*\n/gm, '\n'); // remove comments from text to avoid issues with parser + const idSelector = '#' + id; const iFrameID = 'i' + id; const iFrameID_selector = '#' + iFrameID; From e3760d1709f78b22609a8489cf2ebb069bce55e8 Mon Sep 17 00:00:00 2001 From: Kshitij Date: Sat, 25 Mar 2023 20:13:30 +0530 Subject: [PATCH 5/7] Fixed regex bug --- docs/config/setup/modules/mermaidAPI.md | 2 +- packages/mermaid/src/mermaidAPI.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/config/setup/modules/mermaidAPI.md b/docs/config/setup/modules/mermaidAPI.md index e942a8d6d..b94fc8b94 100644 --- a/docs/config/setup/modules/mermaidAPI.md +++ b/docs/config/setup/modules/mermaidAPI.md @@ -95,7 +95,7 @@ mermaid.initialize(config); #### Defined in -[mermaidAPI.ts:661](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L661) +[mermaidAPI.ts:662](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaidAPI.ts#L662) ## Functions diff --git a/packages/mermaid/src/mermaidAPI.ts b/packages/mermaid/src/mermaidAPI.ts index da706d502..dba629477 100644 --- a/packages/mermaid/src/mermaidAPI.ts +++ b/packages/mermaid/src/mermaidAPI.ts @@ -399,7 +399,8 @@ const render = async function ( // clean up text CRLFs text = text.replace(/\r\n?/g, '\n'); // parser problems on CRLF ignore all CR and leave LF;; - text = text.replace(/\s*%%.*\n/gm, '\n'); // remove comments from text to avoid issues with parser + // eslint-disable-next-line unicorn/better-regex + text = text.replace(/\s*%%[^{\ninit].*\n/gm, '\n'); // remove comments from text to avoid issues with parser const idSelector = '#' + id; const iFrameID = 'i' + id; From 022e6670d0d827006d5707920d85cd8bf9f12dd8 Mon Sep 17 00:00:00 2001 From: PIRADATA <16529503+piradata@users.noreply.github.com> Date: Fri, 24 Mar 2023 17:45:27 -0300 Subject: [PATCH 6/7] docs: fix hexagon node flowchart code example Use `mermaid-example` instead of `mmd` so that Mermaid formats the code properly. --- docs/syntax/flowchart.md | 2 -- packages/mermaid/src/docs/syntax/flowchart.md | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/syntax/flowchart.md b/docs/syntax/flowchart.md index c2c04f750..c79f12b23 100644 --- a/docs/syntax/flowchart.md +++ b/docs/syntax/flowchart.md @@ -183,8 +183,6 @@ flowchart LR ### A hexagon node -Code: - ```mermaid-example flowchart LR id1{{This is the text in the box}} diff --git a/packages/mermaid/src/docs/syntax/flowchart.md b/packages/mermaid/src/docs/syntax/flowchart.md index 42c7cbf5b..8e73f597b 100644 --- a/packages/mermaid/src/docs/syntax/flowchart.md +++ b/packages/mermaid/src/docs/syntax/flowchart.md @@ -122,9 +122,7 @@ flowchart LR ### A hexagon node -Code: - -```mmd +```mermaid-example flowchart LR id1{{This is the text in the box}} ``` From 093f1697e1376ee7827180df720a55d832952a4f Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Sat, 25 Mar 2023 21:16:45 +0000 Subject: [PATCH 7/7] build: remove inline-specifiers pnpm option Remove the `use-inline-specifiers-lockfile-format=true` pnpm option from our `.npmrc` file. This was added in [PNPM version v7.7.0](https://github.com/pnpm/pnpm/releases/tag/v7.7.0) and should make our `pnpm-lock.yaml` file much nicer, but unfortunately, renovate doesn't seem to support it (unsure why?). This means that whenever we do a `pnpm install` locally, the lock-file gets changed, and whenever renovate makes a PR, it changes the lock-file back. This causes a lot of unnecassary merge conflicts. --- .npmrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.npmrc b/.npmrc index 289684302..4c2f52b3b 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,2 @@ auto-install-peers=true strict-peer-dependencies=false -use-inline-specifiers-lockfile-format=true