From 273941a9fe075089aea6e5d9a204c1b9cc24edd5 Mon Sep 17 00:00:00 2001 From: welfuture Date: Sat, 20 Apr 2024 20:46:14 +0800 Subject: [PATCH] chore: remove repetitive words Signed-off-by: welfuture --- packages/mermaid/src/config.ts | 2 +- packages/mermaid/src/dagre-wrapper/GraphObjects.md | 2 +- packages/mermaid/src/dagre-wrapper/intersect/index.js | 2 +- packages/mermaid/src/diagrams/block/blockDB.ts | 2 +- .../diagrams/flowchart/parser/flow-vertice-chaining.spec.js | 4 ++-- packages/mermaid/src/diagrams/flowchart/parser/flow.spec.js | 2 +- packages/mermaid/src/diagrams/state/stateDb.js | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/mermaid/src/config.ts b/packages/mermaid/src/config.ts index 4168c24c4f..b766d9b42b 100644 --- a/packages/mermaid/src/config.ts +++ b/packages/mermaid/src/config.ts @@ -21,7 +21,7 @@ export const updateCurrentConfig = (siteCfg: MermaidConfig, _directives: Mermaid let sumOfDirectives: MermaidConfig = {}; for (const d of _directives) { sanitize(d); - // Apply the data from the directive where the the overrides the themeVariables + // Apply the data from the directive where the overrides the themeVariables sumOfDirectives = assignWithDepth(sumOfDirectives, d); } diff --git a/packages/mermaid/src/dagre-wrapper/GraphObjects.md b/packages/mermaid/src/dagre-wrapper/GraphObjects.md index 730b42e3f6..4620adeec8 100644 --- a/packages/mermaid/src/dagre-wrapper/GraphObjects.md +++ b/packages/mermaid/src/dagre-wrapper/GraphObjects.md @@ -45,7 +45,7 @@ flowchart a --> C2 ``` -To handle this case a special type of edge is inserted. The edge to/from the cluster is replaced with an edge to/from a node in the cluster which is tagged with toCluster/fromCluster. When rendering this edge the intersection between the edge and the border of the cluster is calculated making the edge start/stop there. In practice this renders like an an edge to/from the cluster. +To handle this case a special type of edge is inserted. The edge to/from the cluster is replaced with an edge to/from a node in the cluster which is tagged with toCluster/fromCluster. When rendering this edge the intersection between the edge and the border of the cluster is calculated making the edge start/stop there. In practice this renders like an edge to/from the cluster. In the diagram above the root diagram would be rendered with C1 whereas C2 would be rendered recursively. diff --git a/packages/mermaid/src/dagre-wrapper/intersect/index.js b/packages/mermaid/src/dagre-wrapper/intersect/index.js index e33b6dd510..47f71747db 100644 --- a/packages/mermaid/src/dagre-wrapper/intersect/index.js +++ b/packages/mermaid/src/dagre-wrapper/intersect/index.js @@ -1,5 +1,5 @@ /* - * Borrowed with love from from dagre-d3. Many thanks to cpettitt! + * Borrowed with love from dagre-d3. Many thanks to cpettitt! */ import node from './intersect-node.js'; diff --git a/packages/mermaid/src/diagrams/block/blockDB.ts b/packages/mermaid/src/diagrams/block/blockDB.ts index e4c863c1dd..f00bf9779f 100644 --- a/packages/mermaid/src/diagrams/block/blockDB.ts +++ b/packages/mermaid/src/diagrams/block/blockDB.ts @@ -262,7 +262,7 @@ const getBlocksFlat = () => { return [...Object.values(blockDatabase)]; }; /** - * Returns the the hierarchy of blocks + * Returns the hierarchy of blocks * @returns */ const getBlocks = () => { 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 3f1078030d..384241b2d3 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 @@ -141,7 +141,7 @@ describe('when parsing flowcharts', function () { expect(edges[3].type).toBe('arrow_point'); expect(edges[3].text).toBe(''); }); - it('should handle chaining and multiple nodes in in link statement FVC ', function () { + it('should handle chaining and multiple nodes in link statement FVC ', function () { const res = flow.parser.parse(` graph TD A --> B & B2 & C --> D2; @@ -181,7 +181,7 @@ describe('when parsing flowcharts', function () { expect(edges[5].type).toBe('arrow_point'); expect(edges[5].text).toBe(''); }); - it('should handle chaining and multiple nodes in in link statement with extra info in statements', function () { + it('should handle chaining and multiple nodes in link statement with extra info in statements', function () { const res = flow.parser.parse(` graph TD A[ h ] -- hello --> B[" test "]:::exClass & C --> D; diff --git a/packages/mermaid/src/diagrams/flowchart/parser/flow.spec.js b/packages/mermaid/src/diagrams/flowchart/parser/flow.spec.js index 8d0aec789e..9a1017d124 100644 --- a/packages/mermaid/src/diagrams/flowchart/parser/flow.spec.js +++ b/packages/mermaid/src/diagrams/flowchart/parser/flow.spec.js @@ -64,7 +64,7 @@ describe('parsing a flow chart', function () { expect(edges[0].end).toBe('monograph'); }); - describe('special characters should be be handled.', function () { + describe('special characters should be handled.', function () { const charTest = function (char, result) { const res = flow.parser.parse('graph TD;A(' + char + ')-->B;'); diff --git a/packages/mermaid/src/diagrams/state/stateDb.js b/packages/mermaid/src/diagrams/state/stateDb.js index 0ff32cbb33..23ff78129c 100644 --- a/packages/mermaid/src/diagrams/state/stateDb.js +++ b/packages/mermaid/src/diagrams/state/stateDb.js @@ -145,7 +145,7 @@ const getRootDocV2 = () => { * Ex: the section within a fork has its own statements, and incoming and outgoing statements * refer to the fork as a whole (document). * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement. - * This will push the statement into the the list of statements for the current document. + * This will push the statement into the list of statements for the current document. * * @param _doc */