diff --git a/.cspell/code-terms.txt b/.cspell/code-terms.txt index f4862006f..285b66365 100644 --- a/.cspell/code-terms.txt +++ b/.cspell/code-terms.txt @@ -53,7 +53,6 @@ frontmatter funs gantt GENERICTYPE -getBoundarys grammr graphtype halign diff --git a/.github/ISSUE_TEMPLATE/theme_proposal.yml b/.github/ISSUE_TEMPLATE/theme_proposal.yml index da4fddbec..2e55b71d6 100644 --- a/.github/ISSUE_TEMPLATE/theme_proposal.yml +++ b/.github/ISSUE_TEMPLATE/theme_proposal.yml @@ -29,7 +29,7 @@ body: label: Colors description: |- A detailed list of the different colour values to use. - A list of currently used variable names can be found [here](https://mermaid-js.github.io/mermaid/#/theming?id=theme-variables-reference-table) + See the [list of currently used variable names](https://mermaid-js.github.io/mermaid/#/theming?id=theme-variables-reference-table) placeholder: |- - background: #f4f4f4 - primaryColor: #fff4dd diff --git a/.github/lychee.toml b/.github/lychee.toml index 8032bbf98..b4e8ba0fb 100644 --- a/.github/lychee.toml +++ b/.github/lychee.toml @@ -46,7 +46,7 @@ exclude = [ # Drupal 403 "https://(www.)?drupal.org", -# Swimm returns 404, eventhough the link is valid +# Swimm returns 404, even though the link is valid "https://docs.swimm.io", # Timeout diff --git a/.github/stale.yml b/.github/stale.yml index 30c4ca4a0..94a16dfbd 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -15,5 +15,5 @@ markComment: > If you are still interested in this issue and it is still relevant you can comment to revive it. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: > - This issue has been been automatically closed due to a lack of activity. + This issue has been automatically closed due to a lack of activity. This is done to maintain a clean list of issues that the community is interested in developing. diff --git a/CHANGELOG.md b/CHANGELOG.md index ede5e19ad..8a4c0a414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -256,7 +256,7 @@ mermaid.run({ - 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) - 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) +- Mermaid neutral 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) - Gantt diagrams too narrow [\#493](https://github.com/knsv/mermaid/issues/493) - Flowchart edge labels placement [\#490](https://github.com/knsv/mermaid/issues/490) @@ -833,7 +833,7 @@ mermaid.run({ - Merge pull request \#1 from knsv/master [\#96](https://github.com/knsv/mermaid/pull/96) ([gkchic](https://github.com/gkchic)) - Removed duplicated section in flowchart docs [\#94](https://github.com/knsv/mermaid/pull/94) ([kaime](https://github.com/kaime)) - Grammar changes to sequence page [\#93](https://github.com/knsv/mermaid/pull/93) ([gkchic](https://github.com/gkchic)) -- Github buttons [\#89](https://github.com/knsv/mermaid/pull/89) ([gkchic](https://github.com/gkchic)) +- GitHub buttons [\#89](https://github.com/knsv/mermaid/pull/89) ([gkchic](https://github.com/gkchic)) - Template change [\#88](https://github.com/knsv/mermaid/pull/88) ([gkchic](https://github.com/gkchic)) ## [0.3.1](https://github.com/knsv/mermaid/tree/0.3.1) (2015-01-05) @@ -1002,4 +1002,4 @@ mermaid.run({ ## [0.1.0](https://github.com/knsv/mermaid/tree/0.1.0) (2014-11-16) -\* _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_ +\* _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/GitHub-Changelog-Generator)_ diff --git a/README.md b/README.md index 2fca46b25..760ce0f25 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Try Live Editor previews of future releases: Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out! +Banner for "The Official Guide to Mermaid.js" book ## Table of content @@ -451,7 +451,7 @@ For public sites, it can be precarious to retrieve text from users on the intern As an extra level of security for sites with external users we are happy to introduce a new security level in which the diagram is rendered in a sandboxed iframe preventing javascript in the code from being executed. This is a great step forward for better security. -_Unfortunately you can not have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code._ +_Unfortunately you cannot have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code._ ## Reporting vulnerabilities diff --git a/README.zh-CN.md b/README.zh-CN.md index e5b20caed..cd44e56b6 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -43,13 +43,13 @@ Mermaid **感谢所有参与进来提交 PR,解答疑问的人们! 🙏** -Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out! +Banner for "The Official Guide to Mermaid.js" book ## 关于 Mermaid -Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。 +Mermaid 是一个基于 JavaScript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。 > Doc-Rot 是 Mermaid 致力于解决的一个难题。 diff --git a/cypress/integration/other/interaction.spec.js b/cypress/integration/other/interaction.spec.js index 857141b5b..e57701fd9 100644 --- a/cypress/integration/other/interaction.spec.js +++ b/cypress/integration/other/interaction.spec.js @@ -20,7 +20,7 @@ describe('Interaction', () => { }); it('Graph: should handle a click on a node with a bound url', () => { - // When there is a URL, cy.contains selects the a tag instead of the span. The .node is a child of a, so we have to use find instead of parent. + // When there is a URL, `cy.contains()` selects the `a` tag instead of the `span` tag. The .node is a child of `a`, so we have to use `find()` instead of `parent`. cy.contains('URLTest1').find('.node').click(); cy.location().should(({ href }) => { expect(href).to.eq('http://localhost:9000/empty.html'); @@ -146,7 +146,7 @@ describe('Interaction', () => { }); }); - describe('Interaction - security level other, missspelling', () => { + describe('Interaction - security level other, misspelling', () => { beforeEach(() => { cy.visit('http://localhost:9000/click_security_other.html'); }); diff --git a/cypress/integration/rendering/architecture.spec.ts b/cypress/integration/rendering/architecture.spec.ts index ec74a5dd5..997a6654e 100644 --- a/cypress/integration/rendering/architecture.spec.ts +++ b/cypress/integration/rendering/architecture.spec.ts @@ -19,7 +19,7 @@ describe.skip('architecture diagram', () => { ` ); }); - it('should render a simple architecture diagram with titleAndAccessabilities', () => { + it('should render a simple architecture diagram with titleAndAccessibilities', () => { imgSnapshotTest( `architecture-beta title Simple Architecture Diagram diff --git a/cypress/integration/rendering/block.spec.js b/cypress/integration/rendering/block.spec.js index f5d5103e8..589a30fde 100644 --- a/cypress/integration/rendering/block.spec.js +++ b/cypress/integration/rendering/block.spec.js @@ -14,7 +14,7 @@ describe('Block diagram', () => { ); }); - it('BL2: should handle colums statement in sub-blocks', () => { + it('BL2: should handle columns statement in sub-blocks', () => { imgSnapshotTest( `block-beta id1["Hello"] @@ -30,7 +30,7 @@ describe('Block diagram', () => { ); }); - it('BL3: should align block widths and handle colums statement in sub-blocks', () => { + it('BL3: should align block widths and handle columns statement in sub-blocks', () => { imgSnapshotTest( `block-beta block @@ -46,7 +46,7 @@ describe('Block diagram', () => { ); }); - it('BL4: should align block widths and handle colums statements in deeper sub-blocks then 1 level', () => { + it('BL4: should align block widths and handle columns statements in deeper sub-blocks then 1 level', () => { imgSnapshotTest( `block-beta columns 1 @@ -66,7 +66,7 @@ describe('Block diagram', () => { ); }); - it('BL5: should align block widths and handle colums statements in deeper sub-blocks then 1 level (alt)', () => { + it('BL5: should align block widths and handle columns statements in deeper sub-blocks then 1 level (alt)', () => { imgSnapshotTest( `block-beta columns 1 @@ -236,7 +236,7 @@ describe('Block diagram', () => { ); }); - it('BL17: width alignment - blocks shold be equal in width', () => { + it('BL17: width alignment - blocks should be equal in width', () => { imgSnapshotTest( `block-beta A("This is the text") diff --git a/cypress/integration/rendering/classDiagram.spec.js b/cypress/integration/rendering/classDiagram.spec.js index a98a359ed..e7d201b5d 100644 --- a/cypress/integration/rendering/classDiagram.spec.js +++ b/cypress/integration/rendering/classDiagram.spec.js @@ -429,7 +429,7 @@ describe('Class diagram', () => { classDiagram class \`This\nTitle\nHas\nMany\nNewlines\` { +String Also - -Stirng Many + -String Many #int Members +And() -Many() @@ -443,7 +443,7 @@ describe('Class diagram', () => { classDiagram class \`This\nTitle\nHas\nMany\nNewlines\` { +String Also - -Stirng Many + -String Many #int Members +And() -Many() @@ -459,7 +459,7 @@ describe('Class diagram', () => { namespace testingNamespace { class \`This\nTitle\nHas\nMany\nNewlines\` { +String Also - -Stirng Many + -String Many #int Members +And() -Many() diff --git a/cypress/integration/rendering/flowchart-elk.spec.js b/cypress/integration/rendering/flowchart-elk.spec.js index c31df1181..27af2c40c 100644 --- a/cypress/integration/rendering/flowchart-elk.spec.js +++ b/cypress/integration/rendering/flowchart-elk.spec.js @@ -208,13 +208,13 @@ describe('Flowchart ELK', () => { `flowchart-elk TB internet nat - routeur + router lb1 lb2 compute1 compute2 subgraph project - routeur + router nat subgraph subnet1 compute1 @@ -225,8 +225,8 @@ describe('Flowchart ELK', () => { lb2 end end - internet --> routeur - routeur --> subnet1 & subnet2 + internet --> router + router --> subnet1 & subnet2 subnet1 & subnet2 --> nat --> internet `, { htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' } @@ -443,7 +443,7 @@ flowchart-elk TD { htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' } ); }); - it('63-elk: title on subgraphs should be themable', () => { + it('63-elk: title on subgraphs should be themeable', () => { imgSnapshotTest( ` %%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%% diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index 4322500df..2e30d7a0c 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -198,13 +198,13 @@ describe('Flowchart v2', () => { `flowchart TB internet nat - routeur + router lb1 lb2 compute1 compute2 subgraph project - routeur + router nat subgraph subnet1 compute1 @@ -215,8 +215,8 @@ describe('Flowchart v2', () => { lb2 end end - internet --> routeur - routeur --> subnet1 & subnet2 + internet --> router + router --> subnet1 & subnet2 subnet1 & subnet2 --> nat --> internet `, { htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' } @@ -433,7 +433,7 @@ flowchart TD { htmlLabels: true, flowchart: { htmlLabels: true }, securityLevel: 'loose' } ); }); - it('63: title on subgraphs should be themable', () => { + it('63: title on subgraphs should be themeable', () => { imgSnapshotTest( ` %%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%% @@ -699,7 +699,7 @@ A --> B { flowchart: { titleTopMargin: 10 } } ); }); - it('3192: It should be possieble to render flowcharts with invisible edges', () => { + it('3192: It should be possible to render flowcharts with invisible edges', () => { imgSnapshotTest( `--- title: Simple flowchart with invisible edges @@ -1076,11 +1076,11 @@ end ); }); }); - describe('New @ sytax for node metadata edge cases', () => { + describe('New @ syntax for node metadata edge cases', () => { it('should be possible to use @ syntax to add labels on multi nodes', () => { imgSnapshotTest( `flowchart TB - n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"} + n2["label for n2"] & n4@{ label: "label for n4"} & n5@{ label: "label for n5"} `, {} ); @@ -1088,7 +1088,7 @@ end it('should be possible to use @ syntax to add labels with trail spaces and &', () => { imgSnapshotTest( `flowchart TB - n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"} + n2["label for n2"] & n4@{ label: "label for n4"} & n5@{ label: "label for n5"} `, {} ); @@ -1097,8 +1097,8 @@ end imgSnapshotTest( `flowchart TB n2["label for n2"] - n4@{ label: "labe for n4"} - n5@{ label: "labe for n5"} + n4@{ label: "label for n4"} + n5@{ label: "label for n5"} `, {} ); diff --git a/cypress/integration/rendering/gantt.spec.js b/cypress/integration/rendering/gantt.spec.js index a0c2dbcb9..fc64f45d3 100644 --- a/cypress/integration/rendering/gantt.spec.js +++ b/cypress/integration/rendering/gantt.spec.js @@ -117,7 +117,7 @@ describe('Gantt diagram', () => { {} ); }); - it('should FAIL redering a gantt chart for issue #1060 with invalid date', () => { + it('should FAIL rendering a gantt chart for issue #1060 with invalid date', () => { imgSnapshotTest( ` gantt @@ -573,7 +573,7 @@ describe('Gantt diagram', () => { ` ); }); - it('should render a gantt diagram exculding friday and saturday', () => { + it('should render a gantt diagram excluding friday and saturday', () => { imgSnapshotTest( `gantt title A Gantt Diagram @@ -584,7 +584,7 @@ describe('Gantt diagram', () => { A task :a1, 2024-02-28, 10d` ); }); - it('should render a gantt diagram exculding saturday and sunday', () => { + it('should render a gantt diagram excluding saturday and sunday', () => { imgSnapshotTest( `gantt title A Gantt Diagram @@ -671,7 +671,7 @@ describe('Gantt diagram', () => { title Gantt Digram dateFormat YYYY-MM-DD section Section - ;A task with a semiclon :a1, 2014-01-01, 30d + ;A task with a semicolon :a1, 2014-01-01, 30d Another task :after a1 , 20d section Another Task in sec :2014-01-12 , 12d diff --git a/cypress/integration/rendering/gitGraph.spec.js b/cypress/integration/rendering/gitGraph.spec.js index 249febd08..42dc57439 100644 --- a/cypress/integration/rendering/gitGraph.spec.js +++ b/cypress/integration/rendering/gitGraph.spec.js @@ -11,7 +11,7 @@ describe('Git Graph diagram', () => { {} ); }); - it('2: should render a simple gitgraph with commit on main branch with Id', () => { + it('2: should render a simple gitgraph with commit on main branch with id', () => { imgSnapshotTest( `gitGraph commit id: "One" @@ -253,7 +253,7 @@ describe('Git Graph diagram', () => { ` gitGraph checkout main - %% Make sure to manually set the ID of all commits, for consistent visual tests + %% Make sure to manually set the id of all commits, for consistent visual tests commit id: "1-abcdefg" checkout main branch branch1 @@ -343,7 +343,7 @@ gitGraph {} ); }); - it('16: should render a simple gitgraph with commit on main branch with Id | Vertical Branch', () => { + it('16: should render a simple gitgraph with commit on main branch with id | Vertical Branch', () => { imgSnapshotTest( `gitGraph TB: commit id: "One" @@ -585,7 +585,7 @@ gitGraph ` gitGraph TB: checkout main - %% Make sure to manually set the ID of all commits, for consistent visual tests + %% Make sure to manually set the id of all commits, for consistent visual tests commit id: "1-abcdefg" checkout main branch branch1 @@ -1024,7 +1024,7 @@ gitGraph TB: {} ); }); - it('51: should render a simple gitgraph with commit on main branch with Id | Vertical Branch - Bottom-to-top', () => { + it('51: should render a simple gitgraph with commit on main branch with id | Vertical Branch - Bottom-to-top', () => { imgSnapshotTest( `gitGraph BT: commit id: "One" @@ -1266,7 +1266,7 @@ gitGraph TB: ` gitGraph BT: checkout main - %% Make sure to manually set the ID of all commits, for consistent visual tests + %% Make sure to manually set the id of all commits, for consistent visual tests commit id: "1-abcdefg" checkout main branch branch1 @@ -1491,7 +1491,7 @@ gitGraph TB: ` gitGraph switch main - %% Make sure to manually set the ID of all commits, for consistent visual tests + %% Make sure to manually set the id of all commits, for consistent visual tests commit id: "1-abcdefg" switch main branch branch1 diff --git a/cypress/integration/rendering/kanban.spec.ts b/cypress/integration/rendering/kanban.spec.ts index 6293776d6..0ff564cc6 100644 --- a/cypress/integration/rendering/kanban.spec.ts +++ b/cypress/integration/rendering/kanban.spec.ts @@ -62,7 +62,7 @@ describe('Kanban diagram', () => { {} ); }); - it('6: should handle assigments', () => { + it('6: should handle assignments', () => { imgSnapshotTest( `kanban id1[Todo] @@ -118,7 +118,7 @@ kanban docs[Create Documentation] docs[Create Blog about the new diagram] id7[In progress] - id6[Create renderer so that it works in all cases. We also add som extra text here for testing purposes. And some more just for the extra flare.] + id6[Create renderer so that it works in all cases. We also add some extra text here for testing purposes. And some more just for the extra flare.] id8[Design grammar]@{ assigned: 'knsv' } id9[Ready for deploy] id10[Ready for test] diff --git a/cypress/integration/rendering/mindmap.spec.ts b/cypress/integration/rendering/mindmap.spec.ts index a77459f58..731f861ee 100644 --- a/cypress/integration/rendering/mindmap.spec.ts +++ b/cypress/integration/rendering/mindmap.spec.ts @@ -146,7 +146,7 @@ root shouldHaveRoot ); }); - it('text shouhld wrap with icon', () => { + it('text should wrap with icon', () => { imgSnapshotTest( `mindmap root diff --git a/cypress/integration/rendering/pie.spec.ts b/cypress/integration/rendering/pie.spec.ts index 4a1d774c0..171a83057 100644 --- a/cypress/integration/rendering/pie.spec.ts +++ b/cypress/integration/rendering/pie.spec.ts @@ -64,7 +64,7 @@ describe('pie chart', () => { }); }); - it('should render a pie diagram when textPosition is setted', () => { + it('should render a pie diagram when textPosition is set', () => { imgSnapshotTest( `pie "Dogs": 50 diff --git a/cypress/integration/rendering/quadrantChart.spec.js b/cypress/integration/rendering/quadrantChart.spec.js index 4830db656..3a1e768aa 100644 --- a/cypress/integration/rendering/quadrantChart.spec.js +++ b/cypress/integration/rendering/quadrantChart.spec.js @@ -45,7 +45,7 @@ describe('Quadrant Chart', () => { {} ); }); - it('should able to render y-axix on right side', () => { + it('should able to render y-axis on right side', () => { imgSnapshotTest( ` %%{init: {"quadrantChart": {"yAxisPosition": "right"}}}%% @@ -61,7 +61,7 @@ describe('Quadrant Chart', () => { {} ); }); - it('should able to render x-axix on bottom', () => { + it('should able to render x-axis on bottom', () => { imgSnapshotTest( ` %%{init: {"quadrantChart": {"xAxisPosition": "bottom"}}}%% @@ -77,7 +77,7 @@ describe('Quadrant Chart', () => { {} ); }); - it('should able to render x-axix on bottom and y-axis on right', () => { + it('should able to render x-axis on bottom and y-axis on right', () => { imgSnapshotTest( ` %%{init: {"quadrantChart": {"xAxisPosition": "bottom", "yAxisPosition": "right"}}}%% diff --git a/cypress/integration/rendering/stateDiagram-v2.spec.js b/cypress/integration/rendering/stateDiagram-v2.spec.js index 606a1a3f5..83190dbc7 100644 --- a/cypress/integration/rendering/stateDiagram-v2.spec.js +++ b/cypress/integration/rendering/stateDiagram-v2.spec.js @@ -138,8 +138,8 @@ describe('State diagram', () => { imgSnapshotTest( ` stateDiagram-v2 - State1: This a a single line description - State2: This a a multi line description + State1: This a single line description + State2: This a multi line description State2: here comes the multi part [*] --> State1 State1 --> State2 @@ -345,7 +345,7 @@ stateDiagram } ); }); - it('v2 width of compond state should grow with title if title is wider', () => { + it('v2 width of compound state should grow with title if title is wider', () => { imgSnapshotTest( ` stateDiagram-v2 @@ -402,8 +402,8 @@ stateDiagram-v2 ` stateDiagram-v2 MyState - note left of MyState : I am a leftie - note right of MyState : I am a rightie + note left of MyState : I am a lefty + note right of MyState : I am a righty `, { logLevel: 0, @@ -552,7 +552,7 @@ style AState fill:#636,border:1px solid red,color:white; { logLevel: 0, fontFamily: 'courier' } ); }); - it(' should let styles take preceedence over classes', () => { + it(' should let styles take precedence over classes', () => { imgSnapshotTest( ` stateDiagram-v2 @@ -565,7 +565,7 @@ style AState fill:#636,border:1px solid red,color:white; { logLevel: 0, fontFamily: 'courier' } ); }); - it(' should allow styles to take effect in stubgraphs', () => { + it(' should allow styles to take effect in subgraphs', () => { imgSnapshotTest( ` stateDiagram diff --git a/cypress/integration/rendering/stateDiagram.spec.js b/cypress/integration/rendering/stateDiagram.spec.js index 9be1f2322..b4c5fa8c1 100644 --- a/cypress/integration/rendering/stateDiagram.spec.js +++ b/cypress/integration/rendering/stateDiagram.spec.js @@ -129,8 +129,8 @@ describe('State diagram', () => { imgSnapshotTest( ` stateDiagram - State1: This a a single line description - State2: This a a multi line description + State1: This a single line description + State2: This a multi line description State2: here comes the multi part [*] --> State1 State1 --> State2 diff --git a/cypress/integration/rendering/timeline.spec.ts b/cypress/integration/rendering/timeline.spec.ts index c748b54d3..dc6fab364 100644 --- a/cypress/integration/rendering/timeline.spec.ts +++ b/cypress/integration/rendering/timeline.spec.ts @@ -7,7 +7,7 @@ describe('Timeline diagram', () => { title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter `, {} @@ -35,7 +35,7 @@ describe('Timeline diagram', () => { section Stone Age 7600 BC : Britain's oldest known house was built in Orkney, Scotland 6000 BC : Sea levels rise and Britain becomes an island.
The people who live here are hunter-gatherers. - section Broze Age + section Bronze Age 2300 BC : People arrive from Europe and settle in Britain.
They bring farming and metalworking. : New styles of pottery and ways of burying the dead appear. 2200 BC : The last major building works are completed at Stonehenge.
People now bury their dead in stone circles. @@ -51,7 +51,7 @@ describe('Timeline diagram', () => { title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter `, {} @@ -68,7 +68,7 @@ describe('Timeline diagram', () => { title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008 : Instagram @@ -84,7 +84,7 @@ describe('Timeline diagram', () => { title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008 : Instagram @@ -101,7 +101,7 @@ describe('Timeline diagram', () => { title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008 : Instagram @@ -118,7 +118,7 @@ describe('Timeline diagram', () => { title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008 : Instagram @@ -135,7 +135,7 @@ describe('Timeline diagram', () => { title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008 : Instagram @@ -152,7 +152,7 @@ describe('Timeline diagram', () => { title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008 : Instagram diff --git a/cypress/platform/ashish2.html b/cypress/platform/ashish2.html index 351dcabc2..30584295d 100644 --- a/cypress/platform/ashish2.html +++ b/cypress/platform/ashish2.html @@ -60,7 +60,7 @@
  timeline
         title My day
-        section section with no tasks
+        section Section with no tasks
         section Go to work at the dog office
           1930 : first step : second step is a long step
                : third step
@@ -70,18 +70,18 @@
           1960 : India fights poverty, looses war to China and gets nuclear weapons from USA and USSR
           1970 : Green Revolution comes to india
         section Another section with no tasks
-          I am a big big big tasks
-          I am not so big tasks
+          I am a very, very big task
+          I am not so big task
     
  timeline
         title MermaidChart 2023 Timeline
         section 2023 Q1 
Release Personal Tier - Buttet 1 : sub-point 1a : sub-point 1b + Bullet 1 : sub-point 1a : sub-point 1b : sub-point 1c Bullet 2 : sub-point 2a : sub-point 2b section 2023 Q2
Release XYZ Tier - Buttet 3 : sub-point
3a : sub-point 3b + Bullet 3 : sub-point
3a : sub-point 3b : sub-point 3c Bullet 4 : sub-point 4a : sub-point 4b @@ -93,7 +93,7 @@ section Stone Age 7600 BC : Britain's oldest known house was built in Orkney, Scotland 6000 BC : Sea levels rise and Britain becomes an island. The people who live here are hunter-gatherers. - section Broze Age + section Bronze Age 2300 BC : People arrive from Europe and settle in Britain. They bring farming and metalworking. : New styles of pottery and ways of burying the dead appear. 2200 BC : The last major building works are completed at Stonehenge. People now bury their dead in stone circles. @@ -106,7 +106,7 @@ title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google : Pixar - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008s : Instagram @@ -122,7 +122,7 @@ title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google : Pixar - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008s : Instagram @@ -139,7 +139,7 @@ title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008 : Instagram @@ -152,7 +152,7 @@ title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google - 2005 : Youtube + 2005 : YouTube 2006 : Twitter 2007 : Tumblr 2008s : Instagram diff --git a/cypress/platform/class.html b/cypress/platform/class.html index edf74e1b6..b649d1184 100644 --- a/cypress/platform/class.html +++ b/cypress/platform/class.html @@ -37,7 +37,7 @@ +String owner +BigDecimal balance +deposit(amount) bool - +withdrawl(amount) int + +withdrawal(amount) int } cssClass "BankAccount" customCss @@ -56,7 +56,7 @@ classE o-- classF : aggregation +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/click_security_other.html b/cypress/platform/click_security_other.html index 11fd806ec..e9a4b2da5 100644 --- a/cypress/platform/click_security_other.html +++ b/cypress/platform/click_security_other.html @@ -77,7 +77,7 @@ document.getElementsByTagName('body')[0].appendChild(div); } - mermaid.initialize({ startOnLoad: true, securityLevel: 'strct', logLevel: 1 }); + mermaid.initialize({ startOnLoad: true, securityLevel: 'strict_', logLevel: 1 }); diff --git a/cypress/platform/current.html b/cypress/platform/current.html index 365986c02..6502fe1e8 100644 --- a/cypress/platform/current.html +++ b/cypress/platform/current.html @@ -31,7 +31,7 @@ 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
@@ -61,9 +61,9 @@ #quot;elit#quot;."}}
- flowchart TB internet nat routeur lb1 lb2 compute1 compute2 subgraph project routeur nat - subgraph subnet1 compute1 lb1 end subgraph subnet2 compute2 lb2 end end internet --> routeur - routeur --> subnet1 & subnet2 subnet1 & subnet2 --> nat --> internet + flowchart TB internet nat router lb1 lb2 compute1 compute2 subgraph project router nat + subgraph subnet1 compute1 lb1 end subgraph subnet2 compute2 lb2 end end internet --> router + router --> subnet1 & subnet2 subnet1 & subnet2 --> nat --> internet
flowchart TD subgraph one[One] subgraph sub_one[Sub One] _sub_one end end subgraph two[Two] diff --git a/cypress/platform/flowchart-sate.html b/cypress/platform/flowchart-state.html similarity index 100% rename from cypress/platform/flowchart-sate.html rename to cypress/platform/flowchart-state.html diff --git a/cypress/platform/git-graph.html b/cypress/platform/git-graph.html index 64b0c9b71..44776036a 100644 --- a/cypress/platform/git-graph.html +++ b/cypress/platform/git-graph.html @@ -38,7 +38,7 @@ +String owner +BigDecimal balance +deposit(amount) bool - +withdrawl(amount) int + +withdrawal(amount) int } cssClass "BankAccount" customCss
diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index cbe2912e0..934d6f44c 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -386,7 +386,7 @@ kanban [Create Documentation] docs[Create Blog about the new diagram] id7[In progress] - id6[Create renderer so that it works in all cases. We also add som extra text here for testing purposes. And some more just for the extra flare.] + id6[Create renderer so that it works in all cases. We also add some extra text here for testing purposes. And some more just for the extra flare.] id9[Ready for deploy] id8[Design grammar]@{ assigned: 'knsv' } id10[Ready for test] diff --git a/cypress/platform/xss7.html b/cypress/platform/xss7.html index 2a2078dfe..ce20144ef 100644 --- a/cypress/platform/xss7.html +++ b/cypress/platform/xss7.html @@ -105,7 +105,7 @@ let diagram = 'graph LR\n'; diagram += " B(Javascript:xssAttack`1`'>Click)"; + diagram += "script>JavaScript:xssAttack`1`'>Click)"; // diagram += "script\u003aalert\u0028document.domain\u0029\` src=x>\"\);\n"; console.log(diagram); // document.querySelector('#diagram').innerHTML = diagram; diff --git a/cypress/platform/yari.html b/cypress/platform/yari.html index 501541c3b..390218344 100644 --- a/cypress/platform/yari.html +++ b/cypress/platform/yari.html @@ -50,7 +50,7 @@ setPoints(List~int~ points) getPoints() List~int~ } - + Square : -List~string~ messages Square : +setMessages(List~string~ messages) Square : +getMessages() List~string~ @@ -88,7 +88,7 @@ --- classDiagram class Duck { - + } @@ -127,8 +127,8 @@ -attribute:type - attribute : type test - - + GetAttribute() type + + + GetAttribute() type + GetAttribute() type } @@ -449,7 +449,7 @@ --- config: theme: forest - look: handDrawns + look: handDrawn layout: elk --- classDiagram diff --git a/cypress/platform/yari2.html b/cypress/platform/yari2.html index bd5ddffc2..53eefe5ba 100644 --- a/cypress/platform/yari2.html +++ b/cypress/platform/yari2.html @@ -41,7 +41,7 @@ CAR:::someclass PERSON:::anotherclass,someclass - + classDef someclass fill:#f96 classDef anotherclass color:blue @@ -90,7 +90,7 @@ erDiagram CAR ||--o{ NAMED-DRIVER : allows CAR { - test test PK "comment" + text text PK "comment" string make string model string[] parts @@ -108,7 +108,7 @@ string carRegistrationNumber PK, FK string driverLicence PK, FK } - MANUFACTURER only one to zero or more CAR : makes + MANUFACTURER only one to zero or more CAR : makes
@@ -129,7 +129,7 @@ string email } p ||--o| a : has - +
diff --git a/demos/c4context.html b/demos/c4context.html index 64ca768e1..d13717c3f 100644 --- a/demos/c4context.html +++ b/demos/c4context.html @@ -110,7 +110,7 @@ title Component diagram for Internet Banking System - API Application Container(spa, "Single Page Application", "javascript and angular", "Provides all the internet banking functionality to customers via their web browser.") - Container(ma, "Mobile App", "Xamarin", "Provides a limited subset ot the internet banking functionality to customers via their mobile mobile device.") + Container(ma, "Mobile App", "Xamarin", "Provides a limited subset ot the internet banking functionality to customers via their mobile device.") ContainerDb(db, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.") System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") diff --git a/demos/classchart.html b/demos/classchart.html index 980ea5098..10d8e6b70 100644 --- a/demos/classchart.html +++ b/demos/classchart.html @@ -148,7 +148,7 @@
     classDiagram
       class Person {
-        +Id : Guid
+        +ID : Guid
         +FirstName : string
         +LastName : string
         -privateProperty : string
@@ -218,10 +218,10 @@
           +double side
         }
       }
-      
+
       Shape <|-- Circle
       Shape <|-- Square
-      
+
       namespace Vehicles {
         class Vehicle {
           +String brand
@@ -233,12 +233,12 @@
           +boolean hasGears
         }
       }
-      
+
       Vehicle <|-- Car
       Vehicle <|-- Bike
       Car --> Circle : "Logo Shape"
       Bike --> Square : "Logo Shape"
-                  
+
     
``` -You can also refer the implementation in the live editor [here](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done. +You can also refer the [implementation in the live editor](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done. C2 ``` -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. +The new nodes C1 and C2 are a special type of nodes, clusterNodes. ClusterNodes have the nodes in the cluster including the cluster attached in a graph object. When rendering this diagram it is 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. @@ -32,7 +32,7 @@ When rendering this diagram it is being rendered recursively. The diagram is ren _Data for a clusterNode_ -When a cluster has edges to or from some of its nodes leading outside the cluster the approach of recursive rendering can not be used as the layout of the graph needs to take responsibility for nodes outside of the cluster. +When a cluster has edges to or from some of its nodes leading outside the cluster the approach of recursive rendering cannot be used as the layout of the graph needs to take responsibility for nodes outside of the cluster. ```mermaid flowchart @@ -53,7 +53,7 @@ Of these two approaches the top one renders better and is used when possible. Wh # Graph objects and their properties -Explains the representation of various objects used to render the flow charts and what the properties mean. This ofc from the perspective of the dagre-wrapper. +Explains the representation of various objects used to render the flow charts and what the properties mean. This is from the perspective of the dagre-wrapper. ## node @@ -100,13 +100,13 @@ double_arrow_point arrow_circle double_arrow_circle -Lets try to make these types semantic free so that diagram type semantics does not find its way in to this more generic layer. +Lets try to make these types semantic free so that diagram type semantics does not find its way into this more generic layer. Required edgeData for proper rendering: | property | description | | ---------- | -------------------------------------------------------------------- | -| id | Id of the edge | +| id | ID of the edge | | arrowHead | overlap between arrowHead and arrowType? | | arrowType | overlap between arrowHead and arrowType? | | style | | diff --git a/packages/mermaid/src/dagre-wrapper/edges.js b/packages/mermaid/src/dagre-wrapper/edges.js index 1a72328e8..8404e54d7 100644 --- a/packages/mermaid/src/dagre-wrapper/edges.js +++ b/packages/mermaid/src/dagre-wrapper/edges.js @@ -279,7 +279,7 @@ export const intersection = (node, outsidePoint, insidePoint) => { return res; } else { - // Intersection onn sides of rect + // Intersection on sides of rect if (insidePoint.x < outsidePoint.x) { r = outsidePoint.x - w - x; } else { @@ -324,7 +324,7 @@ const cutPathAtIntersect = (_points, boundaryNode) => { // check if point is inside the boundary rect if (!outsideNode(boundaryNode, point) && !isInside) { // First point inside the rect found - // Calc the intersection coord between the point anf the last point outside the rect + // Calc the intersection coord between the point and the last point outside the rect const inter = intersection(boundaryNode, lastPointOutside, point); // // Check case where the intersection is the same as the last point diff --git a/packages/mermaid/src/dagre-wrapper/edges.spec.js b/packages/mermaid/src/dagre-wrapper/edges.spec.js index 9b2772ecd..dfe4c7901 100644 --- a/packages/mermaid/src/dagre-wrapper/edges.spec.js +++ b/packages/mermaid/src/dagre-wrapper/edges.spec.js @@ -30,7 +30,7 @@ describe('Graphlib decorations', () => { expect(int.x).toBeCloseTo(192.4609375); expect(int.y).toBeCloseTo(145.15711441743503); }); - it('case 3 - intersection on top of box outside point greater then inside point', function () { + it('case 3 - intersection on top of box outside point greater than inside point', function () { const o = { x: 157, y: 39 }; const i = { x: 104, y: 105 }; const node2 = { @@ -44,7 +44,7 @@ describe('Graphlib decorations', () => { expect(int.y).toBeCloseTo(76); // expect(int.y).toBeCloseTo(67.833) }); - it('case 4 - intersection on top of box inside point greater then inside point', function () { + it('case 4 - intersection on top of box inside point greater than inside point', function () { const o = { x: 144, y: 38 }; const i = { x: 198, y: 105 }; const node2 = { diff --git a/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js b/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js index ef0c2caa7..3873f8f81 100644 --- a/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js +++ b/packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js @@ -351,7 +351,7 @@ export const extractor = (graph, depth) => { return; } // For clusters without incoming and/or outgoing edges, create a new cluster-node - // containing the nodes and edges in the custer in a new graph + // containing the nodes and edges in the cluster in a new graph // for (let i = 0;) let nodes = graph.nodes(); let hasChildren = false; diff --git a/packages/mermaid/src/diagram-api/diagram-orchestration.spec.ts b/packages/mermaid/src/diagram-api/diagram-orchestration.spec.ts index 4517ff622..3ec2d861f 100644 --- a/packages/mermaid/src/diagram-api/diagram-orchestration.spec.ts +++ b/packages/mermaid/src/diagram-api/diagram-orchestration.spec.ts @@ -9,7 +9,7 @@ describe('diagram-orchestration', () => { expect(detectType('graph TD; A-->B')).toBe('flowchart'); }); - describe('proper diagram types should be detetced', () => { + describe('proper diagram types should be detected', () => { beforeAll(() => { addDiagrams(); }); diff --git a/packages/mermaid/src/diagram.spec.ts b/packages/mermaid/src/diagram.spec.ts index 873fada14..8e7759d6d 100644 --- a/packages/mermaid/src/diagram.spec.ts +++ b/packages/mermaid/src/diagram.spec.ts @@ -85,7 +85,7 @@ describe('diagram detection', () => { ); }); - test('should consider entity codes when present in diagram defination', async () => { + test('should consider entity codes when present in diagram definition', async () => { const diagram = await Diagram.fromText(`sequenceDiagram A->>B: I #9829; you! B->>A: I #9829; you #infin; times more!`); diff --git a/packages/mermaid/src/diagrams/architecture/architecture.spec.ts b/packages/mermaid/src/diagrams/architecture/architecture.spec.ts index 45c19e23e..d0405d025 100644 --- a/packages/mermaid/src/diagrams/architecture/architecture.spec.ts +++ b/packages/mermaid/src/diagrams/architecture/architecture.spec.ts @@ -24,7 +24,7 @@ describe('architecture diagrams', () => { await expect(parser.parse(str)).resolves.not.toThrow(); }); - it('should handle an simple radar definition', async () => { + it('should handle a simple radar definition', async () => { const str = `architecture-beta service db `; diff --git a/packages/mermaid/src/diagrams/block/layout.ts b/packages/mermaid/src/diagrams/block/layout.ts index 7f44a5f19..a00e935ac 100644 --- a/packages/mermaid/src/diagrams/block/layout.ts +++ b/packages/mermaid/src/diagrams/block/layout.ts @@ -77,7 +77,7 @@ function setBlockSizes(block: Block, db: BlockDB, siblingWidth = 0, siblingHeigh block?.size?.x, 'block width =', block?.size, - 'sieblingWidth', + 'siblingWidth', siblingWidth ); if (!block?.size?.width) { @@ -141,7 +141,7 @@ function setBlockSizes(block: Block, db: BlockDB, siblingWidth = 0, siblingHeigh // If maxWidth if (width < siblingWidth) { log.debug( - `Detected to small siebling: abc95 ${block.id} sieblingWidth ${siblingWidth} sieblingHeight ${siblingHeight} width ${width}` + `Detected to small sibling: abc95 ${block.id} siblingWidth ${siblingWidth} siblingHeight ${siblingHeight} width ${width}` ); width = siblingWidth; height = siblingHeight; diff --git a/packages/mermaid/src/diagrams/block/parser/block.spec.ts b/packages/mermaid/src/diagrams/block/parser/block.spec.ts index 1bb8691c1..4bf3290d8 100644 --- a/packages/mermaid/src/diagrams/block/parser/block.spec.ts +++ b/packages/mermaid/src/diagrams/block/parser/block.spec.ts @@ -3,7 +3,7 @@ import block from './block.jison'; import db from '../blockDB.js'; describe('Block diagram', function () { - describe('when parsing an block diagram graph it should handle > ', function () { + describe('when parsing a block diagram graph it should handle > ', function () { beforeEach(function () { block.parser.yy = db; block.parser.yy.clear(); @@ -125,7 +125,7 @@ describe('Block diagram', function () { const blocks = db.getBlocks(); expect(blocks.length).toBe(1); }); - it('a diagram withput column statements', () => { + it('a diagram without column statements', () => { const str = `block-beta block1["Block 1"] `; diff --git a/packages/mermaid/src/diagrams/c4/c4Db.js b/packages/mermaid/src/diagrams/c4/c4Db.js index 70248fcc4..db17da9ff 100644 --- a/packages/mermaid/src/diagrams/c4/c4Db.js +++ b/packages/mermaid/src/diagrams/c4/c4Db.js @@ -705,6 +705,7 @@ export const getBoundaries = function (parentBoundary) { } }; +// cspell:ignore getBoundarys /** * @deprecated Use {@link getBoundaries} instead */ diff --git a/packages/mermaid/src/diagrams/c4/c4Renderer.js b/packages/mermaid/src/diagrams/c4/c4Renderer.js index 58dd808fd..87211b24f 100644 --- a/packages/mermaid/src/diagrams/c4/c4Renderer.js +++ b/packages/mermaid/src/diagrams/c4/c4Renderer.js @@ -542,7 +542,7 @@ function drawInsideBoundary( ); } parentBoundaryAlias = currentBoundary.alias; - let nextCurrentBoundaries = diagObj.db.getBoundarys(parentBoundaryAlias); + let nextCurrentBoundaries = diagObj.db.getBoundaries(parentBoundaryAlias); if (nextCurrentBoundaries.length > 0) { // draw boundary inside currentBoundary @@ -622,7 +622,7 @@ export const draw = function (_text, id, _version, diagObj) { globalBoundaryMaxY = conf.diagramMarginY; const title = diagObj.db.getTitle(); - let currentBoundaries = diagObj.db.getBoundarys(''); + let currentBoundaries = diagObj.db.getBoundaries(''); // switch (c4type) { // case 'C4Context': drawInsideBoundary(diagram, '', screenBounds, currentBoundaries, diagObj); diff --git a/packages/mermaid/src/diagrams/c4/parser/c4Boundary.spec.js b/packages/mermaid/src/diagrams/c4/parser/c4Boundary.spec.js index f43f00748..20735eeb0 100644 --- a/packages/mermaid/src/diagrams/c4/parser/c4Boundary.spec.js +++ b/packages/mermaid/src/diagrams/c4/parser/c4Boundary.spec.js @@ -21,7 +21,7 @@ System(SystemAA, "Internet Banking System") const yy = c4.parser.yy; - const boundaries = yy.getBoundarys(); + const boundaries = yy.getBoundaries(); expect(boundaries.length).toBe(2); const boundary = boundaries[1]; @@ -49,7 +49,7 @@ ${macroName}(b1, "BankBoundary") { System(SystemAA, "Internet Banking System") }`); - expect(c4.parser.yy.getBoundarys()[1]).toMatchObject({ + expect(c4.parser.yy.getBoundaries()[1]).toMatchObject({ alias: 'b1', }); }); @@ -60,7 +60,7 @@ ${macroName}(b1, "BankBoundary") { System(SystemAA, "Internet Banking System") }`); - expect(c4.parser.yy.getBoundarys()[1]).toMatchObject({ + expect(c4.parser.yy.getBoundaries()[1]).toMatchObject({ label: { text: 'BankBoundary', }, @@ -73,7 +73,7 @@ ${macroName}(b1, "", "company") { System(SystemAA, "Internet Banking System") }`); - expect(c4.parser.yy.getBoundarys()[1]).toMatchObject({ + expect(c4.parser.yy.getBoundaries()[1]).toMatchObject({ type: { text: 'company' }, }); }); @@ -84,7 +84,7 @@ ${macroName}(b1, $link="https://github.com/mermaidjs") { System(SystemAA, "Internet Banking System") }`); - expect(c4.parser.yy.getBoundarys()[1]).toMatchObject({ + expect(c4.parser.yy.getBoundaries()[1]).toMatchObject({ label: { text: { link: 'https://github.com/mermaidjs', @@ -99,7 +99,7 @@ ${macroName}(b1, $tags="tag1,tag2") { System(SystemAA, "Internet Banking System") }`); - expect(c4.parser.yy.getBoundarys()[1]).toMatchObject({ + expect(c4.parser.yy.getBoundaries()[1]).toMatchObject({ label: { text: { tags: 'tag1,tag2', diff --git a/packages/mermaid/src/diagrams/c4/svgDraw.js b/packages/mermaid/src/diagrams/c4/svgDraw.js index 6bff267f6..5cd8998ae 100644 --- a/packages/mermaid/src/diagrams/c4/svgDraw.js +++ b/packages/mermaid/src/diagrams/c4/svgDraw.js @@ -111,7 +111,7 @@ export const drawRels = (elem, rels, conf) => { }; /** - * Draws an boundary in the diagram + * Draws a boundary in the diagram * * @param {any} elem - The diagram we'll draw to. * @param {any} boundary - The boundary to draw. diff --git a/packages/mermaid/src/diagrams/class/classDb.ts b/packages/mermaid/src/diagrams/class/classDb.ts index b2c3c944c..82ddcf09b 100644 --- a/packages/mermaid/src/diagrams/class/classDb.ts +++ b/packages/mermaid/src/diagrams/class/classDb.ts @@ -99,7 +99,7 @@ export class ClassDB implements DiagramDB { /** * Function called by parser when a node definition has been found. * - * @param id - Id of the class to add + * @param id - ID of the class to add * @public */ public addClass(_id: string) { @@ -524,7 +524,7 @@ export class ClassDB implements DiagramDB { /** * Function called by parser when a namespace definition has been found. * - * @param id - Id of the namespace to add + * @param id - ID of the namespace to add * @public */ public addNamespace(id: string) { @@ -553,8 +553,8 @@ export class ClassDB implements DiagramDB { /** * Function called by parser when a namespace definition has been found. * - * @param id - Id of the namespace to add - * @param classNames - Ids of the class to add + * @param id - ID of the namespace to add + * @param classNames - IDs of the class to add * @public */ public addClassesToNamespace(id: string, classNames: string[]) { diff --git a/packages/mermaid/src/diagrams/class/classDiagram.spec.ts b/packages/mermaid/src/diagrams/class/classDiagram.spec.ts index 35a37f903..7c88f2e41 100644 --- a/packages/mermaid/src/diagrams/class/classDiagram.spec.ts +++ b/packages/mermaid/src/diagrams/class/classDiagram.spec.ts @@ -138,7 +138,7 @@ describe('given a basic class diagram, ', function () { expect(relations[0].title).toBe('manages'); }); - it('should handle backquoted class names', function () { + it('should handle backticked class names', function () { const str = 'classDiagram\n' + 'class `Car`'; parser.parse(str); @@ -1207,7 +1207,7 @@ describe('given a class diagram with relationships, ', function () { parser.parse(str); }); - it('should handle backquoted class name', function () { + it('should handle backticked class name', function () { const str = 'classDiagram\n' + '`Class1` <|-- Class02\n' + diff --git a/packages/mermaid/src/diagrams/common/common.spec.ts b/packages/mermaid/src/diagrams/common/common.spec.ts index 9af244406..3c7e0fdb8 100644 --- a/packages/mermaid/src/diagrams/common/common.spec.ts +++ b/packages/mermaid/src/diagrams/common/common.spec.ts @@ -28,7 +28,7 @@ describe('when securityLevel is antiscript, all script must be removed', () => { it('should remove all javascript urls', () => { compareRemoveScript( `This is a
clean link + clean link - and me too`, + and me too`, `This is a clean link + clean link and me too` ); diff --git a/packages/mermaid/src/diagrams/er/parser/erDiagram.spec.js b/packages/mermaid/src/diagrams/er/parser/erDiagram.spec.js index de602530c..fd1d2a9e5 100644 --- a/packages/mermaid/src/diagrams/er/parser/erDiagram.spec.js +++ b/packages/mermaid/src/diagrams/er/parser/erDiagram.spec.js @@ -40,7 +40,7 @@ describe('when parsing ER diagram it...', function () { allowed.forEach((allowedChar) => { const singleOccurrence = `Blo${allowedChar}rf`; const repeatedOccurrence = `Blo${allowedChar}${allowedChar}rf`; - const cannontStartWith = `${allowedChar}Blorf`; + const cannotStartWith = `${allowedChar}Blorf`; const endsWith = `Blorf${allowedChar}`; it(`${singleOccurrence} fails if not surrounded by quotes`, function () { @@ -73,7 +73,7 @@ describe('when parsing ER diagram it...', function () { expect(entities.has(name)).toBe(true); }); - it(`"${cannontStartWith}" cannot start with the character`, function () { + it(`"${cannotStartWith}" cannot start with the character`, function () { const name = repeatedOccurrence; expect(() => { erDiagram.parser.parse(`erDiagram\n "${name}"\n`); @@ -969,13 +969,13 @@ describe('when parsing ER diagram it...', function () { expect(rels[0].roleA).toBe(''); }); - it('should allow an non-empty quoted label', function () { + it('should allow a non-empty quoted label', function () { erDiagram.parser.parse('erDiagram\nCUSTOMER ||--|{ ORDER : "places"'); const rels = erDb.getRelationships(); expect(rels[0].roleA).toBe('places'); }); - it('should allow an non-empty unquoted label', function () { + it('should allow a non-empty unquoted label', function () { erDiagram.parser.parse('erDiagram\nCUSTOMER ||--|{ ORDER : places'); const rels = erDb.getRelationships(); expect(rels[0].roleA).toBe('places'); diff --git a/packages/mermaid/src/diagrams/flowchart/flowDb.ts b/packages/mermaid/src/diagrams/flowchart/flowDb.ts index de926f294..3eb1b13a7 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowDb.ts +++ b/packages/mermaid/src/diagrams/flowchart/flowDb.ts @@ -315,11 +315,11 @@ You have to call mermaid.initialize.` log.info('addLink', _start, _end, id); - // for a group syntax like A e1@--> B & C, only the first edge should have an the userDefined id + // for a group syntax like A e1@--> B & C, only the first edge should have a userDefined id // the rest of the edges should have auto generated ids for (const start of _start) { for (const end of _end) { - //use the id only for last node in _start and and first node in _end + //use the id only for last node in _start and first node in _end const isLastStart = start === _start[_start.length - 1]; const isFirstEnd = end === _end[0]; if (isLastStart && isFirstEnd) { diff --git a/packages/mermaid/src/diagrams/flowchart/parser/flow-huge.spec.js b/packages/mermaid/src/diagrams/flowchart/parser/flow-huge.spec.js index e512ba86a..5c4bc0d07 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/flow-huge.spec.js +++ b/packages/mermaid/src/diagrams/flowchart/parser/flow-huge.spec.js @@ -14,7 +14,7 @@ describe('[Text] when parsing', () => { describe('it should handle huge files', function () { // skipped because this test takes like 2 minutes or more! - it.skip('it should handlehuge diagrams', function () { + it.skip('it should handle huge diagrams', function () { const nodes = ('A-->B;B-->A;'.repeat(415) + 'A-->B;').repeat(57) + 'A-->B;B-->A;'.repeat(275); flow.parser.parse(`graph LR;${nodes}`); diff --git a/packages/mermaid/src/diagrams/flowchart/parser/flow-interactions.spec.js b/packages/mermaid/src/diagrams/flowchart/parser/flow-interactions.spec.js index 1b75803af..d45c7d4dc 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/flow-interactions.spec.js +++ b/packages/mermaid/src/diagrams/flowchart/parser/flow-interactions.spec.js @@ -36,7 +36,7 @@ describe('[Interactions] when parsing', () => { expect(flowDb.setClickEvent).toHaveBeenCalledWith('A', 'callback'); }); - it('should be possible to use click to a callback with toolip', function () { + it('should be possible to use click to a callback with tooltip', function () { spyOn(flowDb, 'setClickEvent'); spyOn(flowDb, 'setTooltip'); const res = flow.parser.parse('graph TD\nA-->B\nclick A callback "tooltip"'); @@ -48,7 +48,7 @@ describe('[Interactions] when parsing', () => { expect(flowDb.setTooltip).toHaveBeenCalledWith('A', 'tooltip'); }); - it('should be possible to use click to a click and call callback with toolip', function () { + it('should be possible to use click to a click and call callback with tooltip', function () { spyOn(flowDb, 'setClickEvent'); spyOn(flowDb, 'setTooltip'); const res = flow.parser.parse('graph TD\nA-->B\nclick A call callback() "tooltip"'); diff --git a/packages/mermaid/src/diagrams/flowchart/parser/flow-md-string.spec.js b/packages/mermaid/src/diagrams/flowchart/parser/flow-md-string.spec.js index 18bf42a21..b7d3a8c73 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/flow-md-string.spec.js +++ b/packages/mermaid/src/diagrams/flowchart/parser/flow-md-string.spec.js @@ -12,7 +12,7 @@ describe('parsing a flow chart with markdown strings', function () { flow.parser.yy.clear(); }); - it('mardown formatting in nodes and labels', function () { + it('markdown formatting in nodes and labels', function () { const res = flow.parser.parse(`flowchart A["\`The cat in **the** hat\`"]-- "\`The *bat* in the chat\`" -->B["The dog in the hog"] -- "The rat in the mat" -->C;`); @@ -37,7 +37,7 @@ A["\`The cat in **the** hat\`"]-- "\`The *bat* in the chat\`" -->B["The dog in t expect(edges[1].text).toBe('The rat in the mat'); expect(edges[1].labelType).toBe('string'); }); - it('mardown formatting in subgraphs', function () { + it('markdown formatting in subgraphs', function () { const res = flow.parser.parse(`flowchart LR subgraph "One" a("\`The **cat** diff --git a/packages/mermaid/src/diagrams/flowchart/parser/flow-node-data.spec.js b/packages/mermaid/src/diagrams/flowchart/parser/flow-node-data.spec.js index 60620d8b2..0aeccd776 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/flow-node-data.spec.js +++ b/packages/mermaid/src/diagrams/flowchart/parser/flow-node-data.spec.js @@ -124,7 +124,7 @@ describe('when parsing directions', function () { expect(data4Layout.nodes[0].label).toEqual('D'); }); - it('should be forgiving with many spaces before teh end', function () { + it('should be forgiving with many spaces before the end', function () { const res = flow.parser.parse(`flowchart TB D@{ shape: rounded }`); @@ -197,7 +197,7 @@ describe('when parsing directions', function () { expect(data4Layout.nodes[0].shape).toEqual('squareRect'); expect(data4Layout.nodes[0].label).toEqual('This is }'); }); - it('should error on non-existent shape', function () { + it('should error on nonexistent shape', function () { expect(() => { flow.parser.parse(`flowchart TB A@{ shape: this-shape-does-not-exist } @@ -293,14 +293,14 @@ describe('when parsing directions', function () { it('should be possible to use @ syntax to add labels on multi nodes', function () { const res = flow.parser.parse(`flowchart TB - n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"} + n2["label for n2"] & n4@{ label: "label for n4"} & n5@{ label: "label for n5"} `); const data4Layout = flow.parser.yy.getData(); expect(data4Layout.nodes.length).toBe(3); expect(data4Layout.nodes[0].label).toEqual('label for n2'); - expect(data4Layout.nodes[1].label).toEqual('labe for n4'); - expect(data4Layout.nodes[2].label).toEqual('labe for n5'); + expect(data4Layout.nodes[1].label).toEqual('label for n4'); + expect(data4Layout.nodes[2].label).toEqual('label for n5'); }); it('should be possible to use @ syntax to add labels on multi nodes with edge/link', function () { @@ -403,13 +403,13 @@ describe('when parsing directions', function () { it.skip('should be possible to use @ syntax to add labels with trail spaces', function () { const res = flow.parser.parse( `flowchart TB - n2["label for n2"] & n4@{ label: "labe for n4"} & n5@{ label: "labe for n5"} ` + n2["label for n2"] & n4@{ label: "label for n4"} & n5@{ label: "label for n5"} ` ); const data4Layout = flow.parser.yy.getData(); expect(data4Layout.nodes.length).toBe(3); expect(data4Layout.nodes[0].label).toEqual('label for n2'); - expect(data4Layout.nodes[1].label).toEqual('labe for n4'); - expect(data4Layout.nodes[2].label).toEqual('labe for n5'); + expect(data4Layout.nodes[1].label).toEqual('label for n4'); + expect(data4Layout.nodes[2].label).toEqual('label for n5'); }); }); diff --git a/packages/mermaid/src/diagrams/flowchart/parser/flow-text.spec.js b/packages/mermaid/src/diagrams/flowchart/parser/flow-text.spec.js index 606414a11..a4ffab87e 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/flow-text.spec.js +++ b/packages/mermaid/src/diagrams/flowchart/parser/flow-text.spec.js @@ -429,7 +429,7 @@ describe('[Text] when parsing', () => { expect(vert.get('C').text).toBe('Начало'); }); - it('should handle backslask', function () { + it('should handle backslash', function () { const res = flow.parser.parse('graph TD;A-->C(c:\\windows);'); const vert = flow.parser.yy.getVertices(); @@ -596,7 +596,7 @@ describe('[Text] when parsing', () => { expect(() => flow.parser.parse(str)).toThrowError("got 'STR'"); }); - it('should throw error for nested quoatation marks', function () { + it('should throw error for nested quotation marks', function () { const str = 'graph TD; A["This is a "()" in text"];'; expect(() => flow.parser.parse(str)).toThrowError("Expecting 'SQE'"); diff --git a/packages/mermaid/src/diagrams/flowchart/parser/flow-vertice-chaining.spec.js b/packages/mermaid/src/diagrams/flowchart/parser/flow-vertice-chaining.spec.js index 5a560b7dd..32cbcee2b 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/flow-vertice-chaining.spec.js +++ b/packages/mermaid/src/diagrams/flowchart/parser/flow-vertice-chaining.spec.js @@ -57,7 +57,7 @@ describe('when parsing flowcharts', function () { expect(edges[1].type).toBe('arrow_point'); expect(edges[1].text).toBe(''); }); - it('should multiple vertices in link statement in the begining', function () { + it('should multiple vertices in link statement in the beginning', function () { const res = flow.parser.parse(` graph TD A-->B & C; diff --git a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts index 6f2c8c1af..d2d38e86d 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts +++ b/packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts @@ -219,7 +219,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/diagrams/gantt/ganttRenderer.js b/packages/mermaid/src/diagrams/gantt/ganttRenderer.js index a10eb100f..683fdbe1b 100644 --- a/packages/mermaid/src/diagrams/gantt/ganttRenderer.js +++ b/packages/mermaid/src/diagrams/gantt/ganttRenderer.js @@ -467,7 +467,7 @@ export const draw = function (text, id, version, diagObj) { const securityLevel = getConfig().securityLevel; - // Wrap the tasks in an a tag for working links without javascript + // Wrap the tasks in a tag for working links without javascript if (securityLevel === 'sandbox') { let sandboxElement; sandboxElement = select('#i' + id); diff --git a/packages/mermaid/src/diagrams/gantt/parser/gantt.jison b/packages/mermaid/src/diagrams/gantt/parser/gantt.jison index f2333ff84..d4c26eff6 100644 --- a/packages/mermaid/src/diagrams/gantt/parser/gantt.jison +++ b/packages/mermaid/src/diagrams/gantt/parser/gantt.jison @@ -46,7 +46,7 @@ line was introduced with 'click'. /* ---interactivity command--- 'call' adds a callback to the specified task. 'call' can only be specified when -the line was introdcued with 'click'. +the line was introduced with 'click'. 'call ()' attaches the function 'callbackname' with the specified arguments to the task that was specified by 'click'. Function arguments are optional: 'call ()' simply executes 'callbackname' without any arguments. diff --git a/packages/mermaid/src/diagrams/git/gitGraph.spec.ts b/packages/mermaid/src/diagrams/git/gitGraph.spec.ts index 900460dca..fed21dd19 100644 --- a/packages/mermaid/src/diagrams/git/gitGraph.spec.ts +++ b/packages/mermaid/src/diagrams/git/gitGraph.spec.ts @@ -471,7 +471,7 @@ describe('when parsing a gitGraph', function () { it('should handle a gitGraph commit with custom type,tag, msg, commit id,', async () => { const str = `gitGraph: commit type:REVERSE tag: "test tag" msg: "test msg" id: "1111" - + `; await parser.parse(str); @@ -1232,7 +1232,7 @@ describe('when parsing a gitGraph', function () { expect(true).toBe(false); } catch (e: any) { expect(e.message).toBe( - 'Incorrect usage of "merge". Commit with id:1-111 already exists, use different custom Id' + 'Incorrect usage of "merge". Commit with id:1-111 already exists, use different custom id' ); } }); @@ -1255,7 +1255,7 @@ describe('when parsing a gitGraph', function () { it('should throw error when trying to merge branch which has no commits', async () => { const str = `gitGraph branch test1 - + checkout main commit merge test1 diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.ts b/packages/mermaid/src/diagrams/git/gitGraphAst.ts index 44597e9d7..36595eb51 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.ts +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.ts @@ -222,7 +222,7 @@ export const merge = (mergeDB: MergeDB): void => { const error: any = new Error( 'Incorrect usage of "merge". Commit with id:' + customId + - ' already exists, use different custom Id' + ' already exists, use different custom id' ); error.hash = { text: `merge ${otherBranch} ${customId} ${overrideType} ${customTags?.join(' ')}`, diff --git a/packages/mermaid/src/diagrams/info/infoRenderer.ts b/packages/mermaid/src/diagrams/info/infoRenderer.ts index a8314eb72..7e79fc3b1 100644 --- a/packages/mermaid/src/diagrams/info/infoRenderer.ts +++ b/packages/mermaid/src/diagrams/info/infoRenderer.ts @@ -4,7 +4,7 @@ import { selectSvgElement } from '../../rendering-util/selectSvgElement.js'; import { configureSvgSize } from '../../setupGraphViewbox.js'; /** - * Draws a an info picture in the tag with id: id based on the graph definition in text. + * Draws an info picture in the tag with id: id based on the graph definition in text. * * @param text - The text of the diagram. * @param id - The id of the diagram which will be used as a DOM element id. diff --git a/packages/mermaid/src/diagrams/kanban/kanban.spec.ts b/packages/mermaid/src/diagrams/kanban/kanban.spec.ts index 58fdab0e6..3f4f5ab27 100644 --- a/packages/mermaid/src/diagrams/kanban/kanban.spec.ts +++ b/packages/mermaid/src/diagrams/kanban/kanban.spec.ts @@ -11,7 +11,7 @@ describe('when parsing a kanban ', function () { kanban.yy.clear(); setLogLevel('trace'); }); - describe('hiearchy', function () { + describe('hierarchy', function () { it('KNBN-1 should handle a simple root definition abc122', function () { const str = `kanban root`; @@ -21,7 +21,7 @@ describe('when parsing a kanban ', function () { expect(sections.length).toEqual(1); expect(sections[0].label).toEqual('root'); }); - it('KNBN-2 should handle a hierachial kanban definition', function () { + it('KNBN-2 should handle a hierarchical kanban definition', function () { const str = `kanban root child1 @@ -56,7 +56,7 @@ describe('when parsing a kanban ', function () { expect(sections[0].label).toEqual('root'); }); - it('KNBN-4 should not dsitinguis between deeper hierachial levels in thr kanban definition', function () { + it('KNBN-4 should not distinguish between deeper hierarchical levels in the kanban definition', function () { const str = `kanban root child1 diff --git a/packages/mermaid/src/diagrams/mindmap/mindmap.spec.ts b/packages/mermaid/src/diagrams/mindmap/mindmap.spec.ts index 2d67fc600..d4f2d316e 100644 --- a/packages/mermaid/src/diagrams/mindmap/mindmap.spec.ts +++ b/packages/mermaid/src/diagrams/mindmap/mindmap.spec.ts @@ -10,7 +10,7 @@ describe('when parsing a mindmap ', function () { mindmap.yy.clear(); setLogLevel('trace'); }); - describe('hiearchy', function () { + describe('hierarchy', function () { it('MMP-1 should handle a simple root definition abc122', function () { const str = `mindmap root`; @@ -19,7 +19,7 @@ describe('when parsing a mindmap ', function () { // console.log('Time for checks', mindmap.yy.getMindmap().descr); expect(mindmap.yy.getMindmap().descr).toEqual('root'); }); - it('MMP-2 should handle a hierachial mindmap definition', function () { + it('MMP-2 should handle a hierarchical mindmap definition', function () { const str = `mindmap root child1 @@ -43,7 +43,7 @@ describe('when parsing a mindmap ', function () { expect(mindmap.yy.getMindmap().descr).toEqual('root'); }); - it('MMP-4 should handle a deeper hierachial mindmap definition', function () { + it('MMP-4 should handle a deeper hierarchical mindmap definition', function () { const str = `mindmap root child1 diff --git a/packages/mermaid/src/diagrams/mindmap/mindmapRenderer.ts b/packages/mermaid/src/diagrams/mindmap/mindmapRenderer.ts index 5bfa20392..708b3cc28 100644 --- a/packages/mermaid/src/diagrams/mindmap/mindmapRenderer.ts +++ b/packages/mermaid/src/diagrams/mindmap/mindmapRenderer.ts @@ -149,7 +149,7 @@ function positionNodes(db: MindmapDB, cy: cytoscape.Core) { data.y = node.position().y; positionNode(db, data); const el = db.getElementById(data.nodeId); - log.info('Id:', id, 'Position: (', node.position().x, ', ', node.position().y, ')', data); + log.info('id:', id, 'Position: (', node.position().x, ', ', node.position().y, ')', data); el.attr( 'transform', `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})` diff --git a/packages/mermaid/src/diagrams/quadrant-chart/parser/quadrant.jison.spec.ts b/packages/mermaid/src/diagrams/quadrant-chart/parser/quadrant.jison.spec.ts index bf1d1f2ec..f1957679b 100644 --- a/packages/mermaid/src/diagrams/quadrant-chart/parser/quadrant.jison.spec.ts +++ b/packages/mermaid/src/diagrams/quadrant-chart/parser/quadrant.jison.spec.ts @@ -160,20 +160,20 @@ describe('Testing quadrantChart jison file', () => { }); it('should be able to parse quadrant3 text', () => { - let str = 'quadrantChart\nquadrant-3 deligate'; + let str = 'quadrantChart\nquadrant-3 delegate'; expect(parserFnConstructor(str)).not.toThrow(); - expect(mockDB.setQuadrant3Text).toHaveBeenCalledWith({ text: 'deligate', type: 'text' }); + expect(mockDB.setQuadrant3Text).toHaveBeenCalledWith({ text: 'delegate', type: 'text' }); clearMocks(); - str = 'QuadRantChart \n QuaDrant-3 Deligate '; + str = 'QuadRantChart \n QuaDrant-3 Delegate '; expect(parserFnConstructor(str)).not.toThrow(); - expect(mockDB.setQuadrant3Text).toHaveBeenCalledWith({ text: 'Deligate ', type: 'text' }); + expect(mockDB.setQuadrant3Text).toHaveBeenCalledWith({ text: 'Delegate ', type: 'text' }); clearMocks(); - str = 'QuadRantChart \n QuaDrant-3 "Deligate(* +=[❤"'; + str = 'QuadRantChart \n QuaDrant-3 "Delegate(* +=[❤"'; expect(parserFnConstructor(str)).not.toThrow(); expect(mockDB.setQuadrant3Text).toHaveBeenCalledWith({ - text: 'Deligate(* +=[❤', + text: 'Delegate(* +=[❤', type: 'text', }); }); diff --git a/packages/mermaid/src/diagrams/sequence/sequenceRenderer.ts b/packages/mermaid/src/diagrams/sequence/sequenceRenderer.ts index 389171d3c..84bb15b15 100644 --- a/packages/mermaid/src/diagrams/sequence/sequenceRenderer.ts +++ b/packages/mermaid/src/diagrams/sequence/sequenceRenderer.ts @@ -232,7 +232,7 @@ interface NoteModel { } /** - * Draws an note in the diagram with the attached line + * Draws a note in the diagram with the attached line * * @param elem - The diagram to draw to. * @param noteModel - Note model options. diff --git a/packages/mermaid/src/diagrams/sequence/svgDraw.spec.js b/packages/mermaid/src/diagrams/sequence/svgDraw.spec.js index c17bf0f1a..b11eba01c 100644 --- a/packages/mermaid/src/diagrams/sequence/svgDraw.spec.js +++ b/packages/mermaid/src/diagrams/sequence/svgDraw.spec.js @@ -55,7 +55,7 @@ describe('svgDraw', function () { expect(rect.attr).toHaveBeenCalledWith('ry', '10'); expect(rect.attr).toHaveBeenCalledWith('class', 'unitTestRectangleClass'); }); - it('should not add the class attribute if a class isn`t provided', () => { + it('should not add the class attribute if a class is not provided', () => { const svg = MockD3('svg'); svgDraw.drawRect(svg, { x: 10, diff --git a/packages/mermaid/src/diagrams/state/parser/stateDiagram.jison b/packages/mermaid/src/diagrams/state/parser/stateDiagram.jison index e3bc51235..bfaf5a62a 100644 --- a/packages/mermaid/src/diagrams/state/parser/stateDiagram.jison +++ b/packages/mermaid/src/diagrams/state/parser/stateDiagram.jison @@ -3,7 +3,7 @@ * (c) 2014-2021 Knut Sveidqvist * MIT license. * - * Based on js sequence diagrams jison grammr + * Based on js sequence diagrams jison grammar * https://bramp.github.io/js-sequence-diagrams/ * (c) 2012-2013 Andrew Brampton (bramp.net) * Simplified BSD license. diff --git a/packages/mermaid/src/diagrams/state/shapes.js b/packages/mermaid/src/diagrams/state/shapes.js index 5fa964a4a..419d2a76e 100644 --- a/packages/mermaid/src/diagrams/state/shapes.js +++ b/packages/mermaid/src/diagrams/state/shapes.js @@ -37,7 +37,7 @@ export const drawDivider = (g) => .attr('y2', 0); /** - * Draws a an end state as a black circle + * Draws an end state as a black circle * * @param {any} g * @param {any} stateDef @@ -136,7 +136,7 @@ export const drawDescrState = (g, stateDef) => { /** Adds the creates a box around the existing content and adds a panel for the id on top of the content. */ /** - * Function that creates an title row and a frame around a substate for a composite state diagram. + * Function that creates a title row and a frame around a substate for a composite state diagram. * The function returns a new d3 svg object with updated width and height properties; * * @param {any} g The d3 svg object for the substate to framed diff --git a/packages/mermaid/src/diagrams/timeline/timeline.spec.js b/packages/mermaid/src/diagrams/timeline/timeline.spec.js index a7005cada..6a4e287d3 100644 --- a/packages/mermaid/src/diagrams/timeline/timeline.spec.js +++ b/packages/mermaid/src/diagrams/timeline/timeline.spec.js @@ -30,7 +30,7 @@ describe('when parsing a timeline ', function () { }); }); - it('should handle a two section and two coressponding tasks', function () { + it('should handle a two section and two corresponding tasks', function () { let str = `timeline section abc-123 task1 diff --git a/packages/mermaid/src/diagrams/xychart/parser/xychart.jison.spec.ts b/packages/mermaid/src/diagrams/xychart/parser/xychart.jison.spec.ts index 2c2c0b4b9..d7de15f66 100644 --- a/packages/mermaid/src/diagrams/xychart/parser/xychart.jison.spec.ts +++ b/packages/mermaid/src/diagrams/xychart/parser/xychart.jison.spec.ts @@ -128,7 +128,7 @@ describe('Testing xychart jison file', () => { expect(mockDB.setXAxisRangeData).toHaveBeenCalledWith(45.5, 0.34); }); - it('parse x-axis without axisname and range data', () => { + it('parse x-axis without axis name and range data', () => { const str = 'xychart-beta \nx-axis 45.5 --> 1.34 \n'; expect(parserFnConstructor(str)).not.toThrow(); expect(mockDB.setXAxisTitle).toHaveBeenCalledWith({ @@ -154,7 +154,7 @@ describe('Testing xychart jison file', () => { ]); }); - it('parse x-axis without axisname and category data', () => { + it('parse x-axis without axis name and category data', () => { const str = 'xychart-beta \nx-axis [ "cat1" , cat2a ] \n '; expect(parserFnConstructor(str)).not.toThrow(); expect(mockDB.setXAxisTitle).toHaveBeenCalledWith({ @@ -244,7 +244,7 @@ describe('Testing xychart jison file', () => { expect(mockDB.setYAxisTitle).toHaveBeenCalledWith({ text: 'yAxisName', type: 'text' }); expect(mockDB.setYAxisRangeData).toHaveBeenCalledWith(45.5, 33); }); - it('parse y-axis without axisname with range data', () => { + it('parse y-axis without axis name with range data', () => { const str = 'xychart-beta \ny-axis 45.5 --> 33 \n'; expect(parserFnConstructor(str)).not.toThrow(); expect(mockDB.setYAxisTitle).toHaveBeenCalledWith({ text: '', type: 'text' }); diff --git a/packages/mermaid/src/docs/.vitepress/config.ts b/packages/mermaid/src/docs/.vitepress/config.ts index d3f4a9aee..a07d1aea3 100644 --- a/packages/mermaid/src/docs/.vitepress/config.ts +++ b/packages/mermaid/src/docs/.vitepress/config.ts @@ -148,7 +148,7 @@ function sidebarSyntax() { { text: 'Pie Chart', link: '/syntax/pie' }, { text: 'Quadrant Chart', link: '/syntax/quadrantChart' }, { text: 'Requirement Diagram', link: '/syntax/requirementDiagram' }, - { text: 'Gitgraph (Git) Diagram', link: '/syntax/gitgraph' }, + { text: 'GitGraph (Git) Diagram', link: '/syntax/gitgraph' }, { text: 'C4 Diagram 🦺⚠️', link: '/syntax/c4' }, { text: 'Mindmaps', link: '/syntax/mindmap' }, { text: 'Timeline', link: '/syntax/timeline' }, diff --git a/packages/mermaid/src/docs/community/contributing.md b/packages/mermaid/src/docs/community/contributing.md index a962907df..62d06f72f 100644 --- a/packages/mermaid/src/docs/community/contributing.md +++ b/packages/mermaid/src/docs/community/contributing.md @@ -497,14 +497,14 @@ This is a danger alert ### Navigation -If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation**, which is defined in [the vitepress config](../.vitepress/config.ts). The same goes to **topbar**. +If you want to propose changes to how the documentation is _organized_, such as adding a new section or re-arranging or renaming a section, you must update the **sidebar navigation**, which is defined in [the vitepress config](../.vitepress/config.ts). The same goes for **topbar**. ### Build Docs -The content of `/docs` folder is built with Github Actions. +The content of `/docs` folder is built with GitHub Actions. ```warning -So as to allow automatic compilation of documentation pages you have to enable Github Actions on your fork first +So as to allow automatic compilation of documentation pages you have to enable GitHub Actions on your fork first ``` ## Submit your pull request diff --git a/packages/mermaid/src/docs/config/accessibility.md b/packages/mermaid/src/docs/config/accessibility.md index b53567f73..c4f019aa4 100644 --- a/packages/mermaid/src/docs/config/accessibility.md +++ b/packages/mermaid/src/docs/config/accessibility.md @@ -190,12 +190,12 @@ Here is the HTML generated for the SVG element: _(Note that some of the SVG attr ``` -##### Gitgraph +##### GitGraph ```mermaid-example gitGraph - accTitle: My Gitgraph Accessibility Title - accDescr: My Gitgraph Accessibility Description + accTitle: My GitGraph Accessibility Title + accDescr: My GitGraph Accessibility Description commit commit diff --git a/packages/mermaid/src/docs/intro/index.md b/packages/mermaid/src/docs/intro/index.md index 08fa3d675..ff37d549b 100644 --- a/packages/mermaid/src/docs/intro/index.md +++ b/packages/mermaid/src/docs/intro/index.md @@ -44,7 +44,7 @@ For a more detailed introduction to Mermaid and some of its more basic uses, loo 🌐 [CDN](https://www.jsdelivr.com/package/npm/mermaid) | 📖 [Documentation](https://mermaidjs.github.io) | 🙌 [Contribution](../community/contributing.md) | 🔌 [Plug-Ins](../ecosystem/integrations-community.md) -> 🖖 Keep a steady pulse: mermaid needs more Collaborators, [Read More](https://github.com/mermaid-js/mermaid/issues/866). +> 🖖 Keep a steady pulse: [mermaid needs more Collaborators](https://github.com/mermaid-js/mermaid/issues/866). :trophy: **Mermaid was nominated and won the [JS Open Source Awards (2019)](https://osawards.com/javascript/#nominees) in the category "The most exciting use of technology"!!!** @@ -192,7 +192,7 @@ For public sites, it can be precarious to retrieve text from users on the intern As an extra level of security for sites with external users we are happy to introduce a new security level in which the diagram is rendered in a sandboxed iframe preventing JavaScript in the code from being executed. This is a great step forward for better security. -_Unfortunately you can not have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code._ +_Unfortunately you cannot have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code._ ## Reporting vulnerabilities diff --git a/packages/mermaid/src/docs/news/blog.md b/packages/mermaid/src/docs/news/blog.md index 036eda384..d774a932c 100644 --- a/packages/mermaid/src/docs/news/blog.md +++ b/packages/mermaid/src/docs/news/blog.md @@ -10,7 +10,7 @@ Discover how the latest update to the Mermaid Visual Editor transforms class dia 1/16/2025 • 6 mins -Entity relationship (ER) diagrams are a cornerstone of database design, providing a blueprint for modeling your database and enabling clear communication across functions in your organization. As data volumes continue to soar and as AI models demand clean, well-organized data, ER diagrams have become more vital than ever. You can now quickly build ER diagrams with Mermaid Chart, Mermaid AI to Kickstart and fine tune your diagrams . From e-commerce payment flows to social media interactions and healthcare systems, ER diagrams are powering modern, data-driven environments. +Entity relationship (ER) diagrams are a cornerstone of database design, providing a blueprint for modeling your database and enabling clear communication across functions in your organization. As data volumes continue to soar and as AI models demand clean, well-organized data, ER diagrams have become more vital than ever. You can now quickly build ER diagrams with Mermaid Chart, Mermaid AI to kick-start and fine tune your diagrams . From e-commerce payment flows to social media interactions and healthcare systems, ER diagrams are powering modern, data-driven environments. ## [Mermaid Whiteboard: Visual Collaboration Made Universal](https://docs.mermaidchart.com/blog/posts/mermaid-whiteboard-visual-collaboration-made-universal) diff --git a/packages/mermaid/src/docs/syntax/architecture.md b/packages/mermaid/src/docs/syntax/architecture.md index 3fc5629f4..26fdfb150 100644 --- a/packages/mermaid/src/docs/syntax/architecture.md +++ b/packages/mermaid/src/docs/syntax/architecture.md @@ -156,7 +156,7 @@ architecture-beta ## Icons By default, architecture diagram supports the following icons: `cloud`, `database`, `disk`, `internet`, `server`. -Users can use any of the 200,000+ icons available in iconify.design, or add their own custom icons, by following the steps [here](../config/icons.md). +Users can use any of the 200,000+ icons available in iconify.design, or [add custom icons](../config/icons.md). After the icons are installed, they can be used in the architecture diagram by using the format "name:icon-name", where name is the value used when registering the icon pack. diff --git a/packages/mermaid/src/docs/syntax/block.md b/packages/mermaid/src/docs/syntax/block.md index 396f39148..9c721104e 100644 --- a/packages/mermaid/src/docs/syntax/block.md +++ b/packages/mermaid/src/docs/syntax/block.md @@ -458,7 +458,7 @@ block-beta ``` **Correction**: -Ensure that links between blocks are correctly specified with arrows (--> or ---) to define the direction and type of connection. Also remember that one of the fundaments for block diagram is to give the author full control of where the boxes are positioned so in the example you need to add a space between the boxes: +Ensure that links between blocks are correctly specified with arrows (--> or ---) to define the direction and type of connection. Also remember that one of the fundamentals for block diagram is to give the author full control of where the boxes are positioned so in the example you need to add a space between the boxes: ```mermaid-example block-beta diff --git a/packages/mermaid/src/docs/syntax/c4.md b/packages/mermaid/src/docs/syntax/c4.md index 81120d3c0..c9b7eb6ad 100644 --- a/packages/mermaid/src/docs/syntax/c4.md +++ b/packages/mermaid/src/docs/syntax/c4.md @@ -257,7 +257,7 @@ UpdateRelStyle(customerA, bankA, $offsetY="60") title Component diagram for Internet Banking System - API Application Container(spa, "Single Page Application", "javascript and angular", "Provides all the internet banking functionality to customers via their web browser.") - Container(ma, "Mobile App", "Xamarin", "Provides a limited subset to the internet banking functionality to customers via their mobile mobile device.") + Container(ma, "Mobile App", "Xamarin", "Provides a limited subset to the internet banking functionality to customers via their mobile device.") ContainerDb(db, "Database", "Relational Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.") System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") diff --git a/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md b/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md index 600d50723..f9ed8df9b 100644 --- a/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md +++ b/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md @@ -125,7 +125,7 @@ Cardinality is a property that describes how many elements of another entity can ### Identification -Relationships may be classified as either _identifying_ or _non-identifying_ and these are rendered with either solid or dashed lines respectively. This is relevant when one of the entities in question can not have independent existence without the other. For example a firm that insures people to drive cars might need to store data on `NAMED-DRIVER`s. In modelling this we might start out by observing that a `CAR` can be driven by many `PERSON` instances, and a `PERSON` can drive many `CAR`s - both entities can exist without the other, so this is a non-identifying relationship that we might specify in Mermaid as: `PERSON }|..|{ CAR : "driver"`. Note the two dots in the middle of the relationship that will result in a dashed line being drawn between the two entities. But when this many-to-many relationship is resolved into two one-to-many relationships, we observe that a `NAMED-DRIVER` cannot exist without both a `PERSON` and a `CAR` - the relationships become identifying and would be specified using hyphens, which translate to a solid line: +Relationships may be classified as either _identifying_ or _non-identifying_ and these are rendered with either solid or dashed lines respectively. This is relevant when one of the entities in question cannot have independent existence without the other. For example a firm that insures people to drive cars might need to store data on `NAMED-DRIVER`s. In modelling this we might start out by observing that a `CAR` can be driven by many `PERSON` instances, and a `PERSON` can drive many `CAR`s - both entities can exist without the other, so this is a non-identifying relationship that we might specify in Mermaid as: `PERSON }|..|{ CAR : "driver"`. Note the two dots in the middle of the relationship that will result in a dashed line being drawn between the two entities. But when this many-to-many relationship is resolved into two one-to-many relationships, we observe that a `NAMED-DRIVER` cannot exist without both a `PERSON` and a `CAR` - the relationships become identifying and would be specified using hyphens, which translate to a solid line: | Value | Alias for | | :---: | :---------------: | diff --git a/packages/mermaid/src/docs/syntax/flowchart.md b/packages/mermaid/src/docs/syntax/flowchart.md index fa10dcee6..5d9dce324 100644 --- a/packages/mermaid/src/docs/syntax/flowchart.md +++ b/packages/mermaid/src/docs/syntax/flowchart.md @@ -552,7 +552,7 @@ Mermaid also introduces 2 special shapes to enhance your flowcharts: **icon** an ### Icon Shape -You can use the `icon` shape to include an icon in your flowchart. To use icons, you need to register the icon pack first. Follow the instructions provided [here](../config/icons.md). The syntax for defining an icon shape is as follows: +You can use the `icon` shape to include an icon in your flowchart. To use icons, you need to register the icon pack first. Follow the instructions to [add custom icons](../config/icons.md). The syntax for defining an icon shape is as follows: ```mermaid-example flowchart TD diff --git a/packages/mermaid/src/docs/syntax/gantt.md b/packages/mermaid/src/docs/syntax/gantt.md index de54363bc..8b2497f29 100644 --- a/packages/mermaid/src/docs/syntax/gantt.md +++ b/packages/mermaid/src/docs/syntax/gantt.md @@ -416,7 +416,7 @@ click taskId href URL - taskId is the id of the task - callback is the name of a javascript function defined on the page displaying the graph, the function will be called with the taskId as the parameter if no other arguments are specified. -Beginner's tip—a full example using interactive links in an html context: +Beginner's tip—a full example using interactive links in an HTML context: ```html diff --git a/packages/mermaid/src/docs/syntax/gitgraph.md b/packages/mermaid/src/docs/syntax/gitgraph.md index 53840b8f7..66bb2de41 100644 --- a/packages/mermaid/src/docs/syntax/gitgraph.md +++ b/packages/mermaid/src/docs/syntax/gitgraph.md @@ -1,4 +1,4 @@ -# Gitgraph Diagrams +# GitGraph Diagrams > A Git Graph is a pictorial representation of git commits and git actions(commands) on various branches. @@ -271,7 +271,7 @@ Let see an example: commit id:"C" ``` -## Gitgraph specific configuration options +## GitGraph specific configuration options In Mermaid, you have the option to configure the gitgraph diagram. You can configure the following options: @@ -684,7 +684,7 @@ gitGraph: ## Themes -Mermaid supports a bunch of pre-defined themes which you can use to find the right one for you. PS: you can actually override an existing theme's variable to get your own custom theme going. Learn more about theming your diagram [here](../config/theming.md). +Mermaid supports a bunch of pre-defined themes which you can use to find the right one for you. PS: you can actually override an existing theme's variable to get your own custom theme going. Learn more about [theming your diagram](../config/theming.md). The following are the different pre-defined theme options: diff --git a/packages/mermaid/src/docs/syntax/kanban.md b/packages/mermaid/src/docs/syntax/kanban.md index c50eed7d8..3eae43782 100644 --- a/packages/mermaid/src/docs/syntax/kanban.md +++ b/packages/mermaid/src/docs/syntax/kanban.md @@ -64,7 +64,7 @@ todo[Todo] ## Configuration Options -You can customize the Kanban diagram using a configuration block at the beginning of your markdown file. This is useful for setting global settings like a base URL for tickets. Currently there is one configuration option for kanban diagrams `ticketBaseUrl`. This can be set as in the the following example: +You can customize the Kanban diagram using a configuration block at the beginning of your markdown file. This is useful for setting global settings like a base URL for tickets. Currently there is one configuration option for kanban diagrams `ticketBaseUrl`. This can be set as in the following example: ```yaml --- @@ -91,7 +91,7 @@ kanban [Create Documentation] docs[Create Blog about the new diagram] [In progress] - id6[Create renderer so that it works in all cases. We also add som extra text here for testing purposes. And some more just for the extra flare.] + id6[Create renderer so that it works in all cases. We also add some extra text here for testing purposes. And some more just for the extra flare.] id9[Ready for deploy] id8[Design grammar]@{ assigned: 'knsv' } id10[Ready for test] diff --git a/packages/mermaid/src/docs/syntax/mindmap.md b/packages/mermaid/src/docs/syntax/mindmap.md index 07face7f3..3dfbed2f6 100644 --- a/packages/mermaid/src/docs/syntax/mindmap.md +++ b/packages/mermaid/src/docs/syntax/mindmap.md @@ -152,7 +152,7 @@ mindmap C ``` -This outline is unclear as `B` clearly is a child of `A` but when we move on to `C` the clarity is lost. `C` is not a child of `B` with a higher indentation nor does it have the same indentation as `B`. The only thing that is clear is that the first node with smaller indentation, indicating a parent, is A. Then Mermaid relies on this known truth and compensates for the unclear indentation and selects `A` as a parent of `C` leading till the same diagram with `B` and `C` as siblings. +This outline is unclear as `B` clearly is a child of `A` but when we move on to `C` the clarity is lost. `C` is neither a child of `B` with a higher indentation nor does it have the same indentation as `B`. The only thing that is clear is that the first node with smaller indentation, indicating a parent, is A. Then Mermaid relies on this known truth and compensates for the unclear indentation and selects `A` as a parent of `C` leading till the same diagram with `B` and `C` as siblings. ```mermaid mindmap @@ -203,7 +203,7 @@ From version 9.4.0 you can simplify this code to: ``` -You can also refer the implementation in the live editor [here](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done. +You can also refer the [implementation in the live editor](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done.