From 756a442eba3e7d6ab5b353ce6aa66ce5470d1542 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 2 Jan 2024 21:46:44 -0500 Subject: [PATCH 1/7] Add github action to codespell develop on push and PRs --- .github/workflows/codespell.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000000..352c6c5b58 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,23 @@ +# Codespell configuration is within .codespellrc +--- +name: Codespell + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From 077084fce175cdeb10a9ae15644f225223a47004 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 2 Jan 2024 21:46:44 -0500 Subject: [PATCH 2/7] Add rudimentary codespell config --- .codespellrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..1526b43c1c --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +[codespell] +skip = .git,*.pdf,*.svg,go.sum,*.css,.codespellrc +check-hidden = true +# ignore-regex = +# ignore-words-list = From 64f47652ba5cb934883b8f6b19e987b1d448bd09 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 2 Jan 2024 21:51:14 -0500 Subject: [PATCH 3/7] Adjust ignores for codespell --- .codespellrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.codespellrc b/.codespellrc index 1526b43c1c..26dcf5bb0c 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,6 +1,7 @@ # Ref: https://github.com/codespell-project/codespell#using-a-config-file [codespell] -skip = .git,*.pdf,*.svg,go.sum,*.css,.codespellrc +skip = .git,*.pdf,*.svg,go.sum,*.css,.codespellrc,*-lock.yaml check-hidden = true -# ignore-regex = -# ignore-words-list = +# Python regex. Ignore some variable +ignore-regex = \b(classE|curveLinear|afterAll|totalY)\b +ignore-words-list = fo,ot,thi,te,implementors,cript,composit From 30f4acd81b14b9f1b628b48f5a0b5dc7253335d4 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 2 Jan 2024 22:00:58 -0500 Subject: [PATCH 4/7] Ignore lightening -- legit albeit rare --- .codespellrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codespellrc b/.codespellrc index 26dcf5bb0c..b11c711851 100644 --- a/.codespellrc +++ b/.codespellrc @@ -4,4 +4,4 @@ skip = .git,*.pdf,*.svg,go.sum,*.css,.codespellrc,*-lock.yaml check-hidden = true # Python regex. Ignore some variable ignore-regex = \b(classE|curveLinear|afterAll|totalY)\b -ignore-words-list = fo,ot,thi,te,implementors,cript,composit +ignore-words-list = fo,ot,thi,te,implementors,cript,composit,lightening From 22b26f1559141aa72d0855155b062d39e0ff7a2d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 2 Jan 2024 22:00:01 -0500 Subject: [PATCH 5/7] [DATALAD RUNCMD] Do interactive fixing of some ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- CHANGELOG.md | 6 +++--- cypress/platform/class.html | 4 ++-- cypress/platform/git-graph.html | 2 +- docs/syntax/gantt.md | 2 +- packages/mermaid/src/dagre-wrapper/GraphObjects.md | 2 +- packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts | 2 +- packages/mermaid/src/docs/syntax/gantt.md | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ede5e19ad6..8305df8836 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -133,7 +133,7 @@ mermaid.run({ - Overlap, Overflow and cut titles in flowchart [\#814](https://github.com/knsv/mermaid/issues/814) - How load mermaidApi notejs electron [\#813](https://github.com/knsv/mermaid/issues/813) - How to set the spacing between the text of the flowchart node and the border? [\#812](https://github.com/knsv/mermaid/issues/812) -- no triming participant name and the name following spaces is as another actor in sequence [\#809](https://github.com/knsv/mermaid/issues/809) +- no trimming participant name and the name following spaces is as another actor in sequence [\#809](https://github.com/knsv/mermaid/issues/809) - uml Class as shape type [\#807](https://github.com/knsv/mermaid/issues/807) - Force-directed graph Layout Style [\#806](https://github.com/knsv/mermaid/issues/806) - how can I start a newLine in FlowChart [\#805](https://github.com/knsv/mermaid/issues/805) @@ -254,7 +254,7 @@ mermaid.run({ - issue when using sphinxcontrib-mermaid extension for sphinx [\#507](https://github.com/knsv/mermaid/issues/507) - layout of docs page looks broken [\#504](https://github.com/knsv/mermaid/issues/504) - Problem showing graph with php on localhost [\#502](https://github.com/knsv/mermaid/issues/502) -- logLevel's option doesnt work at 7.0.0 [\#501](https://github.com/knsv/mermaid/issues/501) +- logLevel's option doesn't work at 7.0.0 [\#501](https://github.com/knsv/mermaid/issues/501) - How do I get the log for a render or parse attempt? [\#500](https://github.com/knsv/mermaid/issues/500) - Mermaid neutral style style to built in latest release [\#499](https://github.com/knsv/mermaid/issues/499) - Any plans for adding a typescript definition file? [\#495](https://github.com/knsv/mermaid/issues/495) @@ -336,7 +336,7 @@ mermaid.run({ - IE11 Support issue [\#261](https://github.com/knsv/mermaid/issues/261) - mermaid without browser [\#260](https://github.com/knsv/mermaid/issues/260) - Insufficient capacity of gantt diagrams [\#226](https://github.com/knsv/mermaid/issues/226) -- some WARN about installion [\#222](https://github.com/knsv/mermaid/issues/222) +- some WARN about installation [\#222](https://github.com/knsv/mermaid/issues/222) - Live editor offline access [\#217](https://github.com/knsv/mermaid/issues/217) - suggest: code highlight mode config for editors [\#212](https://github.com/knsv/mermaid/issues/212) - Uncaught RangeError: Maximum call stack size exceeded [\#189](https://github.com/knsv/mermaid/issues/189) diff --git a/cypress/platform/class.html b/cypress/platform/class.html index 2f853bbc12..c93ecdf913 100644 --- a/cypress/platform/class.html +++ b/cypress/platform/class.html @@ -37,7 +37,7 @@

info below

+String owner +BigDecimal balance +deposit(amount) bool - +withdrawl(amount) int + +withdrawal(amount) int } cssClass "BankAccount" customCss @@ -56,7 +56,7 @@

info below

+String owner +BigDecimal balance +deposit(amount) bool - +withdrawl(amount) int + +withdrawal(amount) int } Class01~T~ <|-- AveryLongClass : Cool Class03~T~ *-- Class04~T~ diff --git a/cypress/platform/git-graph.html b/cypress/platform/git-graph.html index 4cb2656f1b..18e36e9d36 100644 --- a/cypress/platform/git-graph.html +++ b/cypress/platform/git-graph.html @@ -38,7 +38,7 @@

info below

+String owner +BigDecimal balance +deposit(amount) bool - +withdrawl(amount) int + +withdrawal(amount) int } cssClass "BankAccount" customCss diff --git a/docs/syntax/gantt.md b/docs/syntax/gantt.md index 33c2740e51..7048516d01 100644 --- a/docs/syntax/gantt.md +++ b/docs/syntax/gantt.md @@ -275,7 +275,7 @@ gantt ## Output in compact mode -The compact mode allows you to display multiple tasks in the same row. Compact mode can be enabled for a gantt chart by setting the display mode of the graph via preceeding YAML settings. +The compact mode allows you to display multiple tasks in the same row. Compact mode can be enabled for a gantt chart by setting the display mode of the graph via preceding YAML settings. ```mermaid-example --- diff --git a/packages/mermaid/src/dagre-wrapper/GraphObjects.md b/packages/mermaid/src/dagre-wrapper/GraphObjects.md index 840ddf8242..c9d9244847 100644 --- a/packages/mermaid/src/dagre-wrapper/GraphObjects.md +++ b/packages/mermaid/src/dagre-wrapper/GraphObjects.md @@ -24,7 +24,7 @@ flowchart The new nodes C1 and C2 are a special type of nodes, clusterNodes. ClusterNodes have have the nodes in the cluster including the cluster attached in a graph object. -When rendering this diagram it it beeing rendered recursively. The diagram is rendered by the dagre-mermaid:render function which in turn will be used to render the node C1 and the node C2. The result of those renderings will be inserted as nodes in the "root" diagram. With this recursive approach it would be possible to have different layout direction for each cluster. +When rendering this diagram it it being rendered recursively. The diagram is rendered by the dagre-mermaid:render function which in turn will be used to render the node C1 and the node C2. The result of those renderings will be inserted as nodes in the "root" diagram. With this recursive approach it would be possible to have different layout direction for each cluster. ``` { clusterNode: true, graph } diff --git a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts index 416368e8f9..2259793195 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts +++ b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts @@ -167,7 +167,7 @@ describe('when using the ganttDb', function () { ganttDb.addTask('test3', 'id3,after id2,7d'); ganttDb.addTask('test4', 'id4,2019-02-01,2019-02-20'); // Fixed endTime ganttDb.addTask('test5', 'id5,after id4,1d'); - ganttDb.addSection('full ending taks on last day'); + ganttDb.addSection('full ending task on last day'); ganttDb.addTask('test6', 'id6,2019-02-13,2d'); ganttDb.addTask('test7', 'id7,after id6,1d'); diff --git a/packages/mermaid/src/docs/syntax/gantt.md b/packages/mermaid/src/docs/syntax/gantt.md index a0cebc560d..bf25db2543 100644 --- a/packages/mermaid/src/docs/syntax/gantt.md +++ b/packages/mermaid/src/docs/syntax/gantt.md @@ -203,7 +203,7 @@ gantt ## Output in compact mode -The compact mode allows you to display multiple tasks in the same row. Compact mode can be enabled for a gantt chart by setting the display mode of the graph via preceeding YAML settings. +The compact mode allows you to display multiple tasks in the same row. Compact mode can be enabled for a gantt chart by setting the display mode of the graph via preceding YAML settings. ```mermaid --- From fe33a900c8a12a36208eb8f72e47bc2d8b4b2ca2 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 15 Jan 2024 10:54:19 -0500 Subject: [PATCH 6/7] Ignore lines with pragma: codespell-ignore and ignore one such false positive --- .codespellrc | 2 +- cypress/platform/xss4.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.codespellrc b/.codespellrc index b11c711851..371ad2f0cb 100644 --- a/.codespellrc +++ b/.codespellrc @@ -3,5 +3,5 @@ skip = .git,*.pdf,*.svg,go.sum,*.css,.codespellrc,*-lock.yaml check-hidden = true # Python regex. Ignore some variable -ignore-regex = \b(classE|curveLinear|afterAll|totalY)\b +ignore-regex = \b(classE|curveLinear|afterAll|totalY)\b|.*\bpragma: codespell-ignore.* ignore-words-list = fo,ot,thi,te,implementors,cript,composit,lightening diff --git a/cypress/platform/xss4.html b/cypress/platform/xss4.html index 2360c87ec7..873424c024 100644 --- a/cypress/platform/xss4.html +++ b/cypress/platform/xss4.html @@ -88,7 +88,7 @@ let diagram = '%%{init: {"flowchart": {"htmlLabels": "true"}} }%%\n'; diagram += 'flowchart\n'; diagram += 'A[""]'; From b13e752ae63ffa8db05619956c476baed38fcb8d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 15 Jan 2024 10:54:24 -0500 Subject: [PATCH 7/7] [DATALAD RUNCMD] run codespell throughout fixing typo automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- cypress/platform/current.html | 2 +- docs/news/blog.md | 2 +- docs/syntax/c4.md | 4 ++-- docs/syntax/classDiagram.md | 2 +- packages/mermaid/src/diagrams/c4/c4Db.js | 22 +++++++++---------- .../src/diagrams/git/gitGraphParserV2.spec.js | 2 +- .../src/diagrams/sequence/sequenceDb.js | 2 +- .../diagrams/sequence/sequenceDiagram.spec.js | 2 +- packages/mermaid/src/docs/news/blog.md | 2 +- packages/mermaid/src/docs/syntax/c4.md | 2 +- .../mermaid/src/docs/syntax/classDiagram.md | 2 +- packages/mermaid/src/mermaid.spec.ts | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/cypress/platform/current.html b/cypress/platform/current.html index 35b8ce3bcf..bdba63cd40 100644 --- a/cypress/platform/current.html +++ b/cypress/platform/current.html @@ -31,7 +31,7 @@

info below

flowchart BT subgraph S1 sub1 -->sub2 end subgraph S2 sub4 end S1 --> S2 sub1 --> sub4
- sequenceDiagram Alice->>Bob:Extremely utterly long line of longness which had preivously + sequenceDiagram Alice->>Bob:Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be Bob->>Alice: I'm short though
diff --git a/docs/news/blog.md b/docs/news/blog.md index da20ed1bb6..be4939dee0 100644 --- a/docs/news/blog.md +++ b/docs/news/blog.md @@ -106,7 +106,7 @@ Exciting news for all Mermaid OSS fans: Mermaid Chart has officially launched wi 8 March 2023 · 9 mins -The hype around AI in general and ChatGPT, in particular, is so intense that it’s very understandable to assume the hype train is driving straight toward the trough of disillusionment. +The hype around AI in general and ChatGPT, in particular, is so intense that it’s very understandable to assume the hype train is driving straight toward the through of disillusionment. ## [Flow charts are O(n)2 complex, so don't go over 100 connections](https://www.mermaidchart.com/blog/posts/flow-charts-are-on2-complex-so-dont-go-over-100-connections/) diff --git a/docs/syntax/c4.md b/docs/syntax/c4.md index e6b7736c33..9e64d4cc05 100644 --- a/docs/syntax/c4.md +++ b/docs/syntax/c4.md @@ -320,7 +320,7 @@ UpdateRelStyle(customerA, bankA, $offsetY="60") Person(customer, Customer, "A customer of the bank, with personal bank accounts", $tags="v1.0") Container_Boundary(c1, "Internet Banking") { - Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser") + Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to customers via their web browser") Container_Ext(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device") Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA") ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.") @@ -360,7 +360,7 @@ UpdateRelStyle(customerA, bankA, $offsetY="60") Person(customer, Customer, "A customer of the bank, with personal bank accounts", $tags="v1.0") Container_Boundary(c1, "Internet Banking") { - Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser") + Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to customers via their web browser") Container_Ext(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device") Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA") ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.") diff --git a/docs/syntax/classDiagram.md b/docs/syntax/classDiagram.md index b20ccccb30..2d257a1b99 100644 --- a/docs/syntax/classDiagram.md +++ b/docs/syntax/classDiagram.md @@ -240,7 +240,7 @@ class BankAccount{ #### Generic Types -Generics can be representated as part of a class definition, and for class members/return types. In order to denote an item as generic, you enclose that type within `~` (**tilde**). **Nested** type declarations such as `List>` are supported, though generics that include a comma are currently not supported. (such as `List>`) +Generics can be represented as part of a class definition, and for class members/return types. In order to denote an item as generic, you enclose that type within `~` (**tilde**). **Nested** type declarations such as `List>` are supported, though generics that include a comma are currently not supported. (such as `List>`) > _note_ when a generic is used within a class definition, the generic type is NOT considered part of the class name. i.e.: for any syntax which required you to reference the class name, you need to drop the type part of the definition. This also means that mermaid does not currently support having two classes with the same name, but different generic types. diff --git a/packages/mermaid/src/diagrams/c4/c4Db.js b/packages/mermaid/src/diagrams/c4/c4Db.js index 3fc7e0afca..53439a4d88 100644 --- a/packages/mermaid/src/diagrams/c4/c4Db.js +++ b/packages/mermaid/src/diagrams/c4/c4Db.js @@ -11,7 +11,7 @@ let c4ShapeArray = []; let boundaryParseStack = ['']; let currentBoundaryParse = 'global'; let parentBoundaryParse = ''; -let boundarys = [ +let boundaries = [ { alias: 'global', label: { text: 'global' }, @@ -312,12 +312,12 @@ export const addPersonOrSystemBoundary = function (alias, label, type, tags, lin } let boundary = {}; - const old = boundarys.find((boundary) => boundary.alias === alias); + const old = boundaries.find((boundary) => boundary.alias === alias); if (old && alias === old.alias) { boundary = old; } else { boundary.alias = alias; - boundarys.push(boundary); + boundaries.push(boundary); } // Don't allow null labels, either @@ -368,12 +368,12 @@ export const addContainerBoundary = function (alias, label, type, tags, link) { } let boundary = {}; - const old = boundarys.find((boundary) => boundary.alias === alias); + const old = boundaries.find((boundary) => boundary.alias === alias); if (old && alias === old.alias) { boundary = old; } else { boundary.alias = alias; - boundarys.push(boundary); + boundaries.push(boundary); } // Don't allow null labels, either @@ -433,12 +433,12 @@ export const addDeploymentNode = function ( } let boundary = {}; - const old = boundarys.find((boundary) => boundary.alias === alias); + const old = boundaries.find((boundary) => boundary.alias === alias); if (old && alias === old.alias) { boundary = old; } else { boundary.alias = alias; - boundarys.push(boundary); + boundaries.push(boundary); } // Don't allow null labels, either @@ -514,7 +514,7 @@ export const updateElStyle = function ( ) { let old = c4ShapeArray.find((element) => element.alias === elementName); if (old === undefined) { - old = boundarys.find((element) => element.alias === elementName); + old = boundaries.find((element) => element.alias === elementName); if (old === undefined) { return; } @@ -699,9 +699,9 @@ export const getC4ShapeKeys = function (parentBoundary) { export const getBoundarys = function (parentBoundary) { if (parentBoundary === undefined || parentBoundary === null) { - return boundarys; + return boundaries; } else { - return boundarys.filter((boundary) => boundary.parentBoundary === parentBoundary); + return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary); } }; @@ -723,7 +723,7 @@ export const autoWrap = function () { export const clear = function () { c4ShapeArray = []; - boundarys = [ + boundaries = [ { alias: 'global', label: { text: 'global' }, diff --git a/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js b/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js index 09a9cdb259..555f39af73 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js +++ b/packages/mermaid/src/diagrams/git/gitGraphParserV2.spec.js @@ -6,7 +6,7 @@ describe('when parsing a gitGraph', function () { parser.yy = gitGraphAst; parser.yy.clear(); }); - it('should handle a gitGraph commit with NO pararms, get auto-generated reandom ID', function () { + it('should handle a gitGraph commit with NO params, get auto-generated reandom ID', function () { const str = `gitGraph: commit `; diff --git a/packages/mermaid/src/diagrams/sequence/sequenceDb.js b/packages/mermaid/src/diagrams/sequence/sequenceDb.js index 717cc8c09e..c3744ac606 100644 --- a/packages/mermaid/src/diagrams/sequence/sequenceDb.js +++ b/packages/mermaid/src/diagrams/sequence/sequenceDb.js @@ -126,7 +126,7 @@ export const addSignal = function ( const cnt = activationCount(idFrom.actor); if (cnt < 1) { // Bail out as there is an activation signal from an inactive participant - let error = new Error('Trying to inactivate an inactive participant (' + idFrom.actor + ')'); + let error = new Error('Trying to deactivate an inactive participant (' + idFrom.actor + ')'); error.hash = { text: '->>-', token: '->>-', diff --git a/packages/mermaid/src/diagrams/sequence/sequenceDiagram.spec.js b/packages/mermaid/src/diagrams/sequence/sequenceDiagram.spec.js index 8a7e2281cb..bbc78b5d8d 100644 --- a/packages/mermaid/src/diagrams/sequence/sequenceDiagram.spec.js +++ b/packages/mermaid/src/diagrams/sequence/sequenceDiagram.spec.js @@ -1540,7 +1540,7 @@ describe('when checking the bounds in a sequenceDiagram', function () { expect(bounds.stopx).toBe(300); expect(bounds.stopy).toBe(400); }); - it('should handle multiple loops withtout expanding the bounds', async () => { + it('should handle multiple loops without expanding the bounds', async () => { diagram.renderer.bounds.insert(100, 100, 1000, 1000); diagram.renderer.bounds.verticalPos = 200; diagram.renderer.bounds.newLoop(); diff --git a/packages/mermaid/src/docs/news/blog.md b/packages/mermaid/src/docs/news/blog.md index d9bf6a8b72..a4e78b003f 100644 --- a/packages/mermaid/src/docs/news/blog.md +++ b/packages/mermaid/src/docs/news/blog.md @@ -100,7 +100,7 @@ Exciting news for all Mermaid OSS fans: Mermaid Chart has officially launched wi 8 March 2023 · 9 mins -The hype around AI in general and ChatGPT, in particular, is so intense that it’s very understandable to assume the hype train is driving straight toward the trough of disillusionment. +The hype around AI in general and ChatGPT, in particular, is so intense that it’s very understandable to assume the hype train is driving straight toward the through of disillusionment. ## [Flow charts are O(n)2 complex, so don't go over 100 connections](https://www.mermaidchart.com/blog/posts/flow-charts-are-on2-complex-so-dont-go-over-100-connections/) diff --git a/packages/mermaid/src/docs/syntax/c4.md b/packages/mermaid/src/docs/syntax/c4.md index b6ee5fb795..4f20c5b2c9 100644 --- a/packages/mermaid/src/docs/syntax/c4.md +++ b/packages/mermaid/src/docs/syntax/c4.md @@ -218,7 +218,7 @@ UpdateRelStyle(customerA, bankA, $offsetY="60") Person(customer, Customer, "A customer of the bank, with personal bank accounts", $tags="v1.0") Container_Boundary(c1, "Internet Banking") { - Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser") + Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to customers via their web browser") Container_Ext(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device") Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA") ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.") diff --git a/packages/mermaid/src/docs/syntax/classDiagram.md b/packages/mermaid/src/docs/syntax/classDiagram.md index 95ad0db63c..f597f8914e 100644 --- a/packages/mermaid/src/docs/syntax/classDiagram.md +++ b/packages/mermaid/src/docs/syntax/classDiagram.md @@ -143,7 +143,7 @@ class BankAccount{ #### Generic Types -Generics can be representated as part of a class definition, and for class members/return types. In order to denote an item as generic, you enclose that type within `~` (**tilde**). **Nested** type declarations such as `List>` are supported, though generics that include a comma are currently not supported. (such as `List>`) +Generics can be represented as part of a class definition, and for class members/return types. In order to denote an item as generic, you enclose that type within `~` (**tilde**). **Nested** type declarations such as `List>` are supported, though generics that include a comma are currently not supported. (such as `List>`) > _note_ when a generic is used within a class definition, the generic type is NOT considered part of the class name. i.e.: for any syntax which required you to reference the class name, you need to drop the type part of the definition. This also means that mermaid does not currently support having two classes with the same name, but different generic types. diff --git a/packages/mermaid/src/mermaid.spec.ts b/packages/mermaid/src/mermaid.spec.ts index 390ee74ef0..8a72f54e35 100644 --- a/packages/mermaid/src/mermaid.spec.ts +++ b/packages/mermaid/src/mermaid.spec.ts @@ -174,7 +174,7 @@ describe('when using mermaid and ', () => { await expect(mermaid.parse('graph TQ;A--x|text including URL space|B;')).rejects .toThrowErrorMatchingInlineSnapshot(` "Lexical error on line 1. Unrecognized text. - graph TQ;A--x|text includ + graph TQ;A--x|text include -----^" `); });