From ca909edbed557db93436b67001821829ef4849aa Mon Sep 17 00:00:00 2001 From: yutotnh <57719497+yutotnh@users.noreply.github.com> Date: Wed, 22 Jun 2022 12:39:10 +0900 Subject: [PATCH 1/3] fix: Typo for documents and comments --- README.md | 2 +- docs/Setup.md | 2 +- docs/c4c.md | 2 +- docs/gitgraph.md | 6 +++--- docs/newDiagram.md | 6 +++--- src/dagre-wrapper/GraphObjects.md | 4 ++-- src/dagre-wrapper/clusters.js | 2 +- src/dagre-wrapper/edges.js | 4 ++-- src/dagre-wrapper/index.js | 4 ++-- src/dagre-wrapper/markers.js | 2 +- src/dagre-wrapper/mermaid-graphlib.js | 4 ++-- src/dagre-wrapper/nodes.js | 2 +- src/dagre-wrapper/patterns.js | 2 +- src/diagrams/c4/c4Renderer.js | 2 +- src/diagrams/c4/svgDraw.js | 2 +- src/diagrams/class/classRenderer-v2.js | 4 ++-- src/diagrams/class/classRenderer.js | 2 +- src/diagrams/er/erRenderer.js | 4 ++-- src/diagrams/flowchart/flowDb.js | 2 +- src/diagrams/gantt/ganttRenderer.js | 2 +- src/diagrams/git/gitGraphRenderer.js | 6 +++--- src/diagrams/info/infoRenderer.js | 2 +- src/diagrams/pie/pieRenderer.js | 2 +- src/diagrams/requirement/requirementRenderer.js | 2 +- src/diagrams/sequence/sequenceRenderer.js | 2 +- src/diagrams/state/shapes.js | 2 +- src/diagrams/state/stateRenderer.js | 2 +- src/diagrams/user-journey/journeyRenderer.js | 2 +- src/themes/theme-base.js | 6 +++--- 29 files changed, 43 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 5c2eefa8ce..52c0f03675 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ English | [简体中文](./README.zh-CN.md) ## About -Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development. +Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development. > Doc-Rot is a Catch-22 that Mermaid helps to solve. diff --git a/docs/Setup.md b/docs/Setup.md index 7ef31381e1..65e8ef7710 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -118,7 +118,7 @@ Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'] This option controls if the generated ids of nodes in the SVG are generated randomly or based on a seed. If set to false, the IDs are generated based on the current date and thus are not -deterministic. This is the default behaviour. +deterministic. This is the default behavior. **Notes**: diff --git a/docs/c4c.md b/docs/c4c.md index 9d1f1ec6f6..86c275a06c 100644 --- a/docs/c4c.md +++ b/docs/c4c.md @@ -5,7 +5,7 @@ -Mermaid's c4 diagram sytax is compatible with plantUML. See example below: +Mermaid's c4 diagram syntax is compatible with plantUML. See example below: ```mermaid-example C4Context diff --git a/docs/gitgraph.md b/docs/gitgraph.md index fe8f9b05a0..ee8c321e01 100644 --- a/docs/gitgraph.md +++ b/docs/gitgraph.md @@ -189,12 +189,12 @@ To use the `cherry-pick` keyword, you must specify the id using the `id` attrib `cherry-pick id: "your_custom_id"` -Here, a new commt representing the cherry pick is created on the current branch, and is visually highlighted in the diagram with a **cherry** and a tag depicting the commit id from which it is cherry picked from. +Here, a new commit representing the cherry pick is created on the current branch, and is visually highlighted in the diagram with a **cherry** and a tag depicting the commit id from which it is cherry picked from. Few Important rules to note here are: 1. You need to provide the `id` for an existing commit to be cherry picked. If given commit id does not exist it will result in an error. For this make use of the `commit id:$value` format of declaring commits. See the examples from above. 2. The given commit must not exist on the current branch. Cherry picked commit must always be a different branch than the current branch. -3. Current branch must have atleast one commit, before you can cherry pick a commit, otherwise it will case an error is throw. +3. Current branch must have at least one commit, before you can cherry pick a commit, otherwise it will cause an error is throw. Let see an example: ```mermaid-example @@ -272,7 +272,7 @@ Usage example: ``` ## Commit labels Layout: Rotated or Horizontal -Mermaid supports two types of commit labels layout. The default layout is **rotated**, which means the labels are placed below the commit circle, rotated at 45 degress for better readability. This is particularly useful for commits with long labels. +Mermaid supports two types of commit labels layout. The default layout is **rotated**, which means the labels are placed below the commit circle, rotated at 45 degrees for better readability. This is particularly useful for commits with long labels. The other option is **horizontal**, which means the labels are placed below the commit circle centred horizontally, and are not rotated. This is particularly useful for commits with short labels. diff --git a/docs/newDiagram.md b/docs/newDiagram.md index b17a0d6423..d2c9545c22 100644 --- a/docs/newDiagram.md +++ b/docs/newDiagram.md @@ -110,7 +110,7 @@ Look at `graphDb.js` for more details on that object. ## Layout -If you are using a dagre based layout, please use flowchart-v2 as a template and by doing that you will be using dagre-wrapper instead of dagreD3 which we are m igrating away from. +If you are using a dagre based layout, please use flowchart-v2 as a template and by doing that you will be using dagre-wrapper instead of dagreD3 which we are migrating away from. ### Common parts of a diagram @@ -129,7 +129,7 @@ Here is example handling from flowcharts: Jison: ```jison -/* lexial grammar */ +/* lexical grammar */ %lex %x open_directive %x type_directive @@ -175,7 +175,7 @@ It is probably a good idea to keep the handling similar to this in your new diag The syntax for adding title and description looks like this: ``` accTitle: The title -accDescr: The dsscription +accDescr: The description accDescr { Syntax for a description text diff --git a/src/dagre-wrapper/GraphObjects.md b/src/dagre-wrapper/GraphObjects.md index 52c7cd27cc..416dfeb73d 100644 --- a/src/dagre-wrapper/GraphObjects.md +++ b/src/dagre-wrapper/GraphObjects.md @@ -23,7 +23,7 @@ flowchart The new nodes C1 and C2 are a special type of nodes, clusterNodes. ClusterNodes have have the nodes in the cluster including the cluster attached in a graph object. -When rendering this diagram it it beeing rendered recursivly. The diagram is rendered by the dagre-mermaid:render function which in turn will be used to render the node C1 and the node C2. The result of those renderings will be inserted as nodes in the "root" diagram. With this recursive approach it would be possible to have different layout direction for each cluster. +When rendering this diagram it it beeing rendered recursively. The diagram is rendered by the dagre-mermaid:render function which in turn will be used to render the node C1 and the node C2. The result of those renderings will be inserted as nodes in the "root" diagram. With this recursive approach it would be possible to have different layout direction for each cluster. ``` { clusterNode: true, graph } @@ -74,7 +74,7 @@ This is set by the renderer of the diagram and insert the data that the wrapper | property | description | | ---------- | ----------------------------------------------------------------------------------------------------------- | -| labelStyle | Css styles for the label. User for instance for stylling the labels for clusters | +| labelStyle | Css styles for the label. User for instance for styling the labels for clusters | | shape | The shape of the node. | | labelText | The text on the label | | rx | The corner radius - maybe part of the shape instead? Used for rects. | diff --git a/src/dagre-wrapper/clusters.js b/src/dagre-wrapper/clusters.js index 67e91daec1..40729deadc 100644 --- a/src/dagre-wrapper/clusters.js +++ b/src/dagre-wrapper/clusters.js @@ -78,7 +78,7 @@ const rect = (parent, node) => { }; /** - * Non visiable cluster where the note is group with its + * Non visible cluster where the note is group with its * * @param {any} parent * @param {any} node diff --git a/src/dagre-wrapper/edges.js b/src/dagre-wrapper/edges.js index dbee50b12c..60ded826ec 100644 --- a/src/dagre-wrapper/edges.js +++ b/src/dagre-wrapper/edges.js @@ -313,7 +313,7 @@ const cutPathAtIntersect = (_points, boundryNode) => { // check if point is inside the boundry rect if (!outsideNode(boundryNode, point) && !isInside) { // First point inside the rect found - // Calc the intersection coord between the point anf the last opint ouside the rect + // Calc the intersection coord between the point anf the last point outside the rect const inter = intersection(boundryNode, lastPointOutside, point); log.warn('abc88 inside', point, lastPointOutside, inter); log.warn('abc88 intersection', inter); @@ -391,7 +391,7 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph // } // isInside = true; // } else { - // // outtside + // // outside // lastPointOutside = point; // if (!isInside) points.push(point); // } diff --git a/src/dagre-wrapper/index.js b/src/dagre-wrapper/index.js index ca9f0945ca..daf130f0d8 100644 --- a/src/dagre-wrapper/index.js +++ b/src/dagre-wrapper/index.js @@ -61,7 +61,7 @@ const recursiveRender = (_elem, graph, diagramtype, parentCluster) => { log.warn('Recursive render complete ', newEl, node); } else { if (graph.children(v).length > 0) { - // This is a cluster but not to be rendered recusively + // This is a cluster but not to be rendered recursively // Render as before log.info('Cluster - the non recursive path XXX', v, node.id, node, graph); log.info(findNonClusterChild(node.id, graph)); @@ -117,7 +117,7 @@ const recursiveRender = (_elem, graph, diagramtype, parentCluster) => { } else { // Non cluster node if (graph.children(v).length > 0) { - // A cluster in the non-recurive way + // A cluster in the non-recursive way // positionCluster(node); insertCluster(clusters, node); clusterDb[node.id].node = node; diff --git a/src/dagre-wrapper/markers.js b/src/dagre-wrapper/markers.js index e383feb5ef..ca2a122002 100644 --- a/src/dagre-wrapper/markers.js +++ b/src/dagre-wrapper/markers.js @@ -244,7 +244,7 @@ const barb = (elem, type) => { .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z'); }; -// TODO rename the class diagram markers to something shape descriptive and semanitc free +// TODO rename the class diagram markers to something shape descriptive and semantic free const markers = { extension, composition, diff --git a/src/dagre-wrapper/mermaid-graphlib.js b/src/dagre-wrapper/mermaid-graphlib.js index 0479ee6400..aa7414ff72 100644 --- a/src/dagre-wrapper/mermaid-graphlib.js +++ b/src/dagre-wrapper/mermaid-graphlib.js @@ -210,7 +210,7 @@ export const adjustClustersAndEdges = (graph, depth) => { } else { log.debug('Opting in, graph '); } - // Go through the nodes and for each cluster found, save a replacment node, this can be used when + // Go through the nodes and for each cluster found, save a replacement node, this can be used when // faking a link to a cluster graph.nodes().forEach(function (id) { const children = graph.children(id); @@ -257,7 +257,7 @@ export const adjustClustersAndEdges = (graph, depth) => { }); // For clusters with incoming and/or outgoing edges translate those edges to a real node - // in the cluster inorder to fake the edge + // in the cluster in order to fake the edge graph.edges().forEach(function (e) { const edge = graph.edge(e); log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e)); diff --git a/src/dagre-wrapper/nodes.js b/src/dagre-wrapper/nodes.js index d949ec88e0..5f608b9498 100644 --- a/src/dagre-wrapper/nodes.js +++ b/src/dagre-wrapper/nodes.js @@ -877,7 +877,7 @@ const class_box = (parent, node) => { ); verticalPos = interfaceBBox.height + rowPadding; } - // Positin the class title label + // Position the class title label let diffX = (maxWidth - classTitleBBox.width) / 2; select(classTitleLabel).attr( 'transform', diff --git a/src/dagre-wrapper/patterns.js b/src/dagre-wrapper/patterns.js index 3f007b0eea..75afa8bcc0 100644 --- a/src/dagre-wrapper/patterns.js +++ b/src/dagre-wrapper/patterns.js @@ -45,7 +45,7 @@ const dots = (elem, type) => { .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z'); }; -// TODO rename the class diagram markers to something shape descriptive and semanitc free +// TODO rename the class diagram markers to something shape descriptive and semantic free const patterns = { dots, }; diff --git a/src/diagrams/c4/c4Renderer.js b/src/diagrams/c4/c4Renderer.js index d71e70e2ef..e238aa8178 100644 --- a/src/diagrams/c4/c4Renderer.js +++ b/src/diagrams/c4/c4Renderer.js @@ -568,7 +568,7 @@ function drawInsideBoundary(diagram, parentBoundaryAlias, parentBounds, currentB export const draw = function (text, id) { conf = configApi.getConfig().c4; const securityLevel = configApi.getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/c4/svgDraw.js b/src/diagrams/c4/svgDraw.js index fb3a276dba..8882ae78d8 100644 --- a/src/diagrams/c4/svgDraw.js +++ b/src/diagrams/c4/svgDraw.js @@ -315,7 +315,7 @@ const drawBoundary = function (elem, boundary, conf) { drawRect(boundaryElem, rectData); - // draw lable + // draw label let boundaryConf = conf.boundaryFont(); boundaryConf.fontWeight = 'bold'; boundaryConf.fontSize = boundaryConf.fontSize + 2; diff --git a/src/diagrams/class/classRenderer-v2.js b/src/diagrams/class/classRenderer-v2.js index 509c2198ac..e892134f47 100644 --- a/src/diagrams/class/classRenderer-v2.js +++ b/src/diagrams/class/classRenderer-v2.js @@ -138,7 +138,7 @@ export const addClasses = function (classes, g) { }; /** - * Add edges to graph based on parsed graph defninition + * Add edges to graph based on parsed graph definition * * @param relations * @param {object} g The graph object @@ -317,7 +317,7 @@ export const draw = function (text, id) { // flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes); // } - // Fetch the verices/nodes and edges/links from the parsed graph definition + // Fetch the vertices/nodes and edges/links from the parsed graph definition const classes = classDb.getClasses(); const relations = classDb.getRelations(); diff --git a/src/diagrams/class/classRenderer.js b/src/diagrams/class/classRenderer.js index e9ff20df8e..83f5aa8f2b 100644 --- a/src/diagrams/class/classRenderer.js +++ b/src/diagrams/class/classRenderer.js @@ -168,7 +168,7 @@ export const draw = function (text, id) { log.info('Rendering diagram ' + text); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/er/erRenderer.js b/src/diagrams/er/erRenderer.js index a8589da72c..e43b75ac08 100644 --- a/src/diagrams/er/erRenderer.js +++ b/src/diagrams/er/erRenderer.js @@ -547,7 +547,7 @@ export const draw = function (text, id) { const parser = erParser.parser; parser.yy = erDb; const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); @@ -575,7 +575,7 @@ export const draw = function (text, id) { // --- // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content) // 2. Make sure they are all added to the graph - // 3. Add all the edges (relationships) to the graph aswell + // 3. Add all the edges (relationships) to the graph as well // 4. Let dagre do its magic to layout the graph. This assigns: // - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships // - the path co-ordinates for each edge diff --git a/src/diagrams/flowchart/flowDb.js b/src/diagrams/flowchart/flowDb.js index 00dc61913d..5cdec50bfe 100644 --- a/src/diagrams/flowchart/flowDb.js +++ b/src/diagrams/flowchart/flowDb.js @@ -465,7 +465,7 @@ export const addSubGraph = function (_id, list, _title) { const prims = { boolean: {}, number: {}, string: {} }; const objs = []; - let dir; // = unbdefined; direction.trim(); + let dir; // = undefined; direction.trim(); const nodeList = a.filter(function (item) { const type = typeof item; if (item.stmt && item.stmt === 'dir') { diff --git a/src/diagrams/gantt/ganttRenderer.js b/src/diagrams/gantt/ganttRenderer.js index 2cf46eae57..0065f14d9e 100644 --- a/src/diagrams/gantt/ganttRenderer.js +++ b/src/diagrams/gantt/ganttRenderer.js @@ -30,7 +30,7 @@ export const draw = function (text, id) { parser.parse(text); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/git/gitGraphRenderer.js b/src/diagrams/git/gitGraphRenderer.js index 2735ea83d4..6ee9f18553 100644 --- a/src/diagrams/git/gitGraphRenderer.js +++ b/src/diagrams/git/gitGraphRenderer.js @@ -65,9 +65,9 @@ const drawText = (txt) => { }; /** - * Draws the commits with its symbol and labels. The function has tywo modes, one which only + * Draws the commits with its symbol and labels. The function has two modes, one which only * calculates the positions and one that does the actual drawing. This for a simple way getting the - * vertical leyering rcorrect in the graph. + * vertical layering correct in the graph. * * @param {any} svg * @param {any} commits @@ -345,7 +345,7 @@ const findLane = (y1, y2, _depth) => { }; /** - * This function draw trhe lines between the commits. They were arrows initially. + * This function draw the lines between the commits. They were arrows initially. * * @param {any} svg * @param {any} commit1 diff --git a/src/diagrams/info/infoRenderer.js b/src/diagrams/info/infoRenderer.js index b01931a22f..7b8f68251a 100644 --- a/src/diagrams/info/infoRenderer.js +++ b/src/diagrams/info/infoRenderer.js @@ -28,7 +28,7 @@ export const draw = (text, id, version) => { log.debug('Renering info diagram\n' + text); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/pie/pieRenderer.js b/src/diagrams/pie/pieRenderer.js index 0c3df72202..b44dc97be4 100644 --- a/src/diagrams/pie/pieRenderer.js +++ b/src/diagrams/pie/pieRenderer.js @@ -25,7 +25,7 @@ export const draw = (txt, id) => { log.debug('Rendering info diagram\n' + txt); const securityLevel = configApi.getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/requirement/requirementRenderer.js b/src/diagrams/requirement/requirementRenderer.js index ee26565298..f69805f039 100644 --- a/src/diagrams/requirement/requirementRenderer.js +++ b/src/diagrams/requirement/requirementRenderer.js @@ -324,7 +324,7 @@ export const draw = (text, id) => { parser.parse(text); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/sequence/sequenceRenderer.js b/src/diagrams/sequence/sequenceRenderer.js index caa285a8a5..d83d9dc2bb 100644 --- a/src/diagrams/sequence/sequenceRenderer.js +++ b/src/diagrams/sequence/sequenceRenderer.js @@ -587,7 +587,7 @@ function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoop export const draw = function (text, id) { conf = configApi.getConfig().sequence; const securityLevel = configApi.getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/state/shapes.js b/src/diagrams/state/shapes.js index 2a25e00057..c3826856e9 100644 --- a/src/diagrams/state/shapes.js +++ b/src/diagrams/state/shapes.js @@ -362,7 +362,7 @@ export const drawNote = (text, g) => { /** * Starting point for drawing a state. The function finds out the specifics about the state and - * renders with approprtiate function. + * renders with appropriate function. * * @param {any} elem * @param {any} stateDef diff --git a/src/diagrams/state/stateRenderer.js b/src/diagrams/state/stateRenderer.js index 536a7672f4..89af9386cc 100644 --- a/src/diagrams/state/stateRenderer.js +++ b/src/diagrams/state/stateRenderer.js @@ -48,7 +48,7 @@ const insertMarkers = function (elem) { export const draw = function (text, id) { conf = getConfig().state; const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/diagrams/user-journey/journeyRenderer.js b/src/diagrams/user-journey/journeyRenderer.js index 24ab8cb8a4..5fcaec0203 100644 --- a/src/diagrams/user-journey/journeyRenderer.js +++ b/src/diagrams/user-journey/journeyRenderer.js @@ -56,7 +56,7 @@ export const draw = function (text, id) { parser.parse(text + '\n'); const securityLevel = getConfig().securityLevel; - // Handle root and ocument for when rendering in sanbox mode + // Handle root and Document for when rendering in sanbox mode let sandboxElement; if (securityLevel === 'sandbox') { sandboxElement = select('#i' + id); diff --git a/src/themes/theme-base.js b/src/themes/theme-base.js index 551103ee3a..fcac86dd50 100644 --- a/src/themes/theme-base.js +++ b/src/themes/theme-base.js @@ -5,7 +5,7 @@ class Theme { /** # Base variables */ /** * - Background - used to know what the background color is of the diagram. This is used for - * deducing colors for istance line color. Defaulr value is #f4f4f4. + * deducing colors for instance line color. Default value is #f4f4f4. */ this.background = '#f4f4f4'; this.darkMode = false; @@ -21,7 +21,7 @@ class Theme { this.fontSize = '16px'; } updateColors() { - // The || is to make sure that if the variable has been defiend by a user override that value is to be used + // The || is to make sure that if the variable has been defined by a user override that value is to be used /* Main */ this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#eee' : '#333'); // invert(this.primaryColor); @@ -103,7 +103,7 @@ class Theme { /* state colors */ this.transitionColor = this.transitionColor || this.lineColor; this.transitionLabelColor = this.transitionLabelColor || this.textColor; - /* The color of the text tables of the tstates*/ + /* The color of the text tables of the states*/ this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; this.stateBkg = this.stateBkg || this.mainBkg; From 5619b54cdb04d894a688eacd7fe0033ae9c6d01a Mon Sep 17 00:00:00 2001 From: yutotnh <57719497+yutotnh@users.noreply.github.com> Date: Mon, 27 Jun 2022 12:29:50 +0900 Subject: [PATCH 2/3] fix: typo in cypress --- cypress/e2e/other/configuration.spec.js | 4 +-- cypress/e2e/other/rerender.spec.js | 2 +- cypress/e2e/other/xss.spec.js | 20 ++++++------- cypress/e2e/rendering/classDiagram-v2.spec.js | 8 +++--- .../e2e/rendering/conf-and-directives.spec.js | 4 +-- cypress/e2e/rendering/sequencediagram.spec.js | 28 +++++++++---------- cypress/platform/current2.html | 2 +- cypress/platform/exploit.js | 2 +- cypress/platform/xss.html | 2 +- cypress/platform/xss10.html | 3 +- cypress/platform/xss11.html | 3 +- cypress/platform/xss12.html | 3 +- cypress/platform/xss13.html | 3 +- cypress/platform/xss14.html | 3 +- cypress/platform/xss15.html | 3 +- cypress/platform/xss16.html | 3 +- cypress/platform/xss17.html | 3 +- cypress/platform/xss18.html | 3 +- cypress/platform/xss19.html | 3 +- cypress/platform/xss2.html | 2 +- cypress/platform/xss20.html | 3 +- cypress/platform/xss21.html | 3 +- cypress/platform/xss3.html | 2 +- cypress/platform/xss5.html | 3 +- cypress/platform/xss6.html | 3 +- cypress/platform/xss7.html | 3 +- cypress/platform/xss8.html | 3 +- cypress/platform/xss9.html | 3 +- 28 files changed, 55 insertions(+), 72 deletions(-) diff --git a/cypress/e2e/other/configuration.spec.js b/cypress/e2e/other/configuration.spec.js index a92aae52b4..a67758d9cf 100644 --- a/cypress/e2e/other/configuration.spec.js +++ b/cypress/e2e/other/configuration.spec.js @@ -41,7 +41,7 @@ describe('Configuration', () => { .should('exist') .and('include', 'url(#'); }); - it('should handle arrowMarkerAbsolute excplicitly set to false', () => { + it('should handle arrowMarkerAbsolute explicitly set to false', () => { renderGraph( `graph TD A[Christmas] -->|Get money| B(Go shopping) @@ -63,7 +63,7 @@ describe('Configuration', () => { .should('exist') .and('include', 'url(#'); }); - it('should handle arrowMarkerAbsolute excplicitly set to "false" as false', () => { + it('should handle arrowMarkerAbsolute explicitly set to "false" as false', () => { renderGraph( `graph TD A[Christmas] -->|Get money| B(Go shopping) diff --git a/cypress/e2e/other/rerender.spec.js b/cypress/e2e/other/rerender.spec.js index 8e8c686941..f160a2e273 100644 --- a/cypress/e2e/other/rerender.spec.js +++ b/cypress/e2e/other/rerender.spec.js @@ -1,5 +1,5 @@ describe('Rerendering', () => { - it('should be able to render after an error has occured', () => { + it('should be able to render after an error has occurred', () => { const url = 'http://localhost:9000/render-after-error.html'; cy.viewport(1440, 1024); cy.visit(url); diff --git a/cypress/e2e/other/xss.spec.js b/cypress/e2e/other/xss.spec.js index 6226feaeb9..912354f7de 100644 --- a/cypress/e2e/other/xss.spec.js +++ b/cypress/e2e/other/xss.spec.js @@ -60,52 +60,52 @@ describe('XSS', () => { cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating htmlLabels into a false positive', () => { + it('should not allow manipulating htmlLabels into a false positive', () => { cy.visit('http://localhost:9000/xss4.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating antiscript to run javascript', () => { + it('should not allow manipulating antiscript to run javascript', () => { cy.visit('http://localhost:9000/xss5.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating antiscript to run javascript using onerror', () => { + it('should not allow manipulating antiscript to run javascript using onerror', () => { cy.visit('http://localhost:9000/xss6.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre wrapper', () => { + it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre wrapper', () => { cy.visit('http://localhost:9000/xss8.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { + it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { cy.visit('http://localhost:9000/xss9.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { + it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { cy.visit('http://localhost:9000/xss10.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { + it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { cy.visit('http://localhost:9000/xss11.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { + it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { cy.visit('http://localhost:9000/xss12.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { + it('should not allow manipulating antiscript to run javascript using onerror in state diagrams with dagre d3', () => { cy.visit('http://localhost:9000/xss13.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); }); - it('should not allow maniplulating antiscript to run javascript iframes in class diagrams', () => { + it('should not allow manipulating antiscript to run javascript iframes in class diagrams', () => { cy.visit('http://localhost:9000/xss14.html'); cy.wait(1000); cy.get('#the-malware').should('not.exist'); diff --git a/cypress/e2e/rendering/classDiagram-v2.spec.js b/cypress/e2e/rendering/classDiagram-v2.spec.js index fd373da735..d285a92374 100644 --- a/cypress/e2e/rendering/classDiagram-v2.spec.js +++ b/cypress/e2e/rendering/classDiagram-v2.spec.js @@ -381,7 +381,7 @@ describe('Class diagram V2', () => { cy.get('svg'); }); - it('16b: should handle the direction statemnent with TB', () => { + it('16b: should handle the direction statement with TB', () => { imgSnapshotTest( ` classDiagram @@ -406,7 +406,7 @@ describe('Class diagram V2', () => { cy.get('svg'); }); - it('18: should handle the direction statemnent with LR', () => { + it('18: should handle the direction statement with LR', () => { imgSnapshotTest( ` classDiagram @@ -430,7 +430,7 @@ describe('Class diagram V2', () => { ); cy.get('svg'); }); - it('17a: should handle the direction statemnent with BT', () => { + it('17a: should handle the direction statement with BT', () => { imgSnapshotTest( ` classDiagram @@ -454,7 +454,7 @@ describe('Class diagram V2', () => { ); cy.get('svg'); }); - it('17b: should handle the direction statemment with RL', () => { + it('17b: should handle the direction statement with RL', () => { imgSnapshotTest( ` classDiagram diff --git a/cypress/e2e/rendering/conf-and-directives.spec.js b/cypress/e2e/rendering/conf-and-directives.spec.js index 76de5871d3..3fc0f7f02f 100644 --- a/cypress/e2e/rendering/conf-and-directives.spec.js +++ b/cypress/e2e/rendering/conf-and-directives.spec.js @@ -16,7 +16,7 @@ describe('Configuration and directives - nodes should be light blue', () => { ); cy.get('svg'); }); - it('Settigns from intitialize - nodes should be green', () => { + it('Settings from initialize - nodes should be green', () => { imgSnapshotTest( ` graph TD @@ -30,7 +30,7 @@ graph TD ); cy.get('svg'); }); - it('Settings from initialize overriding themeVariable - nodes shold be red', () => { + it('Settings from initialize overriding themeVariable - nodes should be red', () => { imgSnapshotTest( ` diff --git a/cypress/e2e/rendering/sequencediagram.spec.js b/cypress/e2e/rendering/sequencediagram.spec.js index 1122a30092..c110f05ada 100644 --- a/cypress/e2e/rendering/sequencediagram.spec.js +++ b/cypress/e2e/rendering/sequencediagram.spec.js @@ -76,7 +76,7 @@ context('Sequence diagram', () => { imgSnapshotTest( ` sequenceDiagram - Alice->>Bob: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + 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 loop Loopy Bob->>Alice: Pasten end `, @@ -143,7 +143,7 @@ context('Sequence diagram', () => { imgSnapshotTest( ` sequenceDiagram - participant A as Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + participant A as Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be A->>Bob: Hola Bob-->A: Pasten ! `, @@ -154,7 +154,7 @@ context('Sequence diagram', () => { imgSnapshotTest( ` sequenceDiagram - participant A as wrap:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + participant A as wrap:Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be A->>Bob: Hola Bob-->A: Pasten ! `, @@ -166,7 +166,7 @@ context('Sequence diagram', () => { ` %%{init: {'config': {'wrap': true }}}%% sequenceDiagram - participant A as Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + participant A as Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be A->>Bob: Hola Bob-->A: Pasten ! `, @@ -190,7 +190,7 @@ context('Sequence diagram', () => { ` sequenceDiagram Alice->>Bob: Hola - Note left of Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Note left of Alice: 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 `, {} @@ -201,7 +201,7 @@ context('Sequence diagram', () => { ` sequenceDiagram Alice->>Bob: Hola - Note left of Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Note left of Alice:wrap: 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 `, {} @@ -212,7 +212,7 @@ context('Sequence diagram', () => { ` sequenceDiagram Alice->>Bob: Hola - Note right of Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Note right of Alice: 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 `, {} @@ -223,7 +223,7 @@ context('Sequence diagram', () => { ` sequenceDiagram Alice->>Bob: Hola - Note right of Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Note right of Alice:wrap: 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 `, {} @@ -234,7 +234,7 @@ context('Sequence diagram', () => { ` sequenceDiagram Alice->>Bob: Hola - Note over Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Note over Alice: 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 `, {} @@ -245,7 +245,7 @@ context('Sequence diagram', () => { ` sequenceDiagram Alice->>Bob: Hola - Note over Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Note over Alice:wrap: 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 `, {} @@ -255,7 +255,7 @@ context('Sequence diagram', () => { imgSnapshotTest( ` sequenceDiagram - Alice->>Bob: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + 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 `, {} @@ -265,7 +265,7 @@ context('Sequence diagram', () => { imgSnapshotTest( ` sequenceDiagram - Alice->>Bob:wrap:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Alice->>Bob:wrap: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 `, {} @@ -276,7 +276,7 @@ context('Sequence diagram', () => { ` sequenceDiagram Alice->>Bob: I'm short - Bob->>Alice: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Bob->>Alice: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be `, {} ); @@ -286,7 +286,7 @@ context('Sequence diagram', () => { ` sequenceDiagram Alice->>Bob: I'm short - Bob->>Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Bob->>Alice:wrap: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be `, {} ); diff --git a/cypress/platform/current2.html b/cypress/platform/current2.html index 16ddb4a99a..6f9c2184a6 100644 --- a/cypress/platform/current2.html +++ b/cypress/platform/current2.html @@ -35,7 +35,7 @@

info below

sequenceDiagram - Alice->>Bob:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be + Alice->>Bob:Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be Bob->>Alice: I'm short though
diff --git a/cypress/platform/exploit.js b/cypress/platform/exploit.js index 2b4b0baa53..ff3c918dcc 100644 --- a/cypress/platform/exploit.js +++ b/cypress/platform/exploit.js @@ -3,4 +3,4 @@ div.id = 'the-malware'; div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; parent.document.getElementsByTagName('body')[0].appendChild(div); -throw new Error('XSS Succeded'); +throw new Error('XSS Succeeded'); diff --git a/cypress/platform/xss.html b/cypress/platform/xss.html index e3a4c43517..3938c5aaee 100644 --- a/cypress/platform/xss.html +++ b/cypress/platform/xss.html @@ -31,7 +31,7 @@ document.getElementsByTagName('body')[0].appendChild(div); // const el = document.querySelector('.mermaid'); // el.parentNode.removeChild(el); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } diff --git a/cypress/platform/xss10.html b/cypress/platform/xss10.html index b78817a786..1a863b4b7d 100644 --- a/cypress/platform/xss10.html +++ b/cypress/platform/xss10.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'classDiagram\n'; @@ -105,4 +105,3 @@ - diff --git a/cypress/platform/xss11.html b/cypress/platform/xss11.html index 51d0074d9e..8eadfa43b1 100644 --- a/cypress/platform/xss11.html +++ b/cypress/platform/xss11.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'stateDiagram-v2\n'; @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss12.html b/cypress/platform/xss12.html index 8cdbc88c1d..ff37285424 100644 --- a/cypress/platform/xss12.html +++ b/cypress/platform/xss12.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'stateDiagram-v2\n'; @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss13.html b/cypress/platform/xss13.html index ca020c218c..f3e0ecc498 100644 --- a/cypress/platform/xss13.html +++ b/cypress/platform/xss13.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'stateDiagram-v2\n'; @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss14.html b/cypress/platform/xss14.html index 68b61a809e..75492bbf43 100644 --- a/cypress/platform/xss14.html +++ b/cypress/platform/xss14.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'classDiagram\n'; @@ -105,4 +105,3 @@ - diff --git a/cypress/platform/xss15.html b/cypress/platform/xss15.html index 94506def5f..1d7cfd5e7d 100644 --- a/cypress/platform/xss15.html +++ b/cypress/platform/xss15.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `sequenceDiagram @@ -104,4 +104,3 @@ - diff --git a/cypress/platform/xss16.html b/cypress/platform/xss16.html index 076ed3c347..69355aea3e 100644 --- a/cypress/platform/xss16.html +++ b/cypress/platform/xss16.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `sequenceDiagram @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss17.html b/cypress/platform/xss17.html index 26f6a208a2..874dcb7af3 100644 --- a/cypress/platform/xss17.html +++ b/cypress/platform/xss17.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `sequenceDiagram @@ -103,4 +103,3 @@ - diff --git a/cypress/platform/xss18.html b/cypress/platform/xss18.html index 5dc7df6215..c93e603b1c 100644 --- a/cypress/platform/xss18.html +++ b/cypress/platform/xss18.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `classDiagram @@ -102,4 +102,3 @@ - diff --git a/cypress/platform/xss19.html b/cypress/platform/xss19.html index b5c5a86e99..cce0d97a40 100644 --- a/cypress/platform/xss19.html +++ b/cypress/platform/xss19.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = `classDiagram @@ -104,4 +104,3 @@ - diff --git a/cypress/platform/xss2.html b/cypress/platform/xss2.html index 3f11b8f95d..73b3a26247 100644 --- a/cypress/platform/xss2.html +++ b/cypress/platform/xss2.html @@ -28,7 +28,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } diff --git a/cypress/platform/xss20.html b/cypress/platform/xss20.html index 33d4dfccb5..b782d52f34 100644 --- a/cypress/platform/xss20.html +++ b/cypress/platform/xss20.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } // var diagram = ` graph TD @@ -102,4 +102,3 @@ - diff --git a/cypress/platform/xss21.html b/cypress/platform/xss21.html index 9a88d7afa7..ed243441fd 100644 --- a/cypress/platform/xss21.html +++ b/cypress/platform/xss21.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } // var diagram = ` graph TD @@ -102,4 +102,3 @@ - diff --git a/cypress/platform/xss3.html b/cypress/platform/xss3.html index 015aa0e1f6..c2e1113fa5 100644 --- a/cypress/platform/xss3.html +++ b/cypress/platform/xss3.html @@ -28,7 +28,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } diff --git a/cypress/platform/xss5.html b/cypress/platform/xss5.html index b1fd610c68..86d45eeec3 100644 --- a/cypress/platform/xss5.html +++ b/cypress/platform/xss5.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'graph LR\n'; diagram += 'B-->D(" - diff --git a/cypress/platform/xss6.html b/cypress/platform/xss6.html index 2205b2f067..32eca43136 100644 --- a/cypress/platform/xss6.html +++ b/cypress/platform/xss6.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'graph LR\n'; diagram += 'A()'; @@ -98,4 +98,3 @@ - diff --git a/cypress/platform/xss7.html b/cypress/platform/xss7.html index cbf795d18d..51fcb3ddf7 100644 --- a/cypress/platform/xss7.html +++ b/cypress/platform/xss7.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'graph LR\n'; diagram += " B( - diff --git a/cypress/platform/xss9.html b/cypress/platform/xss9.html index 6b61d5810e..7d06e988ea 100644 --- a/cypress/platform/xss9.html +++ b/cypress/platform/xss9.html @@ -84,7 +84,7 @@ div.className = 'malware'; div.innerHTML = 'XSS Succeeded'; document.getElementsByTagName('body')[0].appendChild(div); - throw new Error('XSS Succeded'); + throw new Error('XSS Succeeded'); } var diagram = 'stateDiagram-v2\n'; @@ -99,4 +99,3 @@ - From 4d4b77f39fd4fa0914b5c13d30e2d03d373a0dff Mon Sep 17 00:00:00 2001 From: yutotnh <57719497+yutotnh@users.noreply.github.com> Date: Mon, 27 Jun 2022 12:34:28 +0900 Subject: [PATCH 3/3] fix: typo for source --- demos/index.html | 4 ++-- src/config.js | 4 ++-- src/dagre-wrapper/edges.spec.js | 2 +- src/diagrams/flowchart/parser/flow-comments.spec.js | 4 ++-- src/diagrams/flowchart/parser/flow.spec.js | 2 +- src/diagrams/state/stateDiagram-v2.spec.js | 8 ++++---- src/diagrams/state/stateDiagram.spec.js | 8 ++++---- src/mermaid.js | 6 +++--- src/mermaidAPI.js | 6 +++--- src/utils.js | 6 +++--- src/utils.spec.js | 6 +++--- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/demos/index.html b/demos/index.html index 0abe627a71..2aa749b9de 100644 --- a/demos/index.html +++ b/demos/index.html @@ -65,7 +65,7 @@ Person(customer, Customer, "A customer of the bank, with personal bank accounts") Container_Boundary(c1, "Internet Banking") { - Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to cutomers via their web browser") + Container(spa, "Single-Page App", "JavaScript, Angular", "Provides all the Internet banking functionality to customers via their web browser") Container_Ext(mobile_app, "Mobile App", "C#, Xamarin", "Provides a limited subset of the Internet banking functionality to customers via their mobile device") Container(web_app, "Web Application", "Java, Spring MVC", "Delivers the static content and the Internet banking SPA") ContainerDb(database, "Database", "SQL Database", "Stores user registration information, hashed auth credentials, access logs, etc.") @@ -99,7 +99,7 @@ System_Ext(mbs, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.") Container_Boundary(api, "API Application") { - Component(sign, "Sign In Controller", "MVC Rest Controlle", "Allows users to sign in to the internet banking system") + Component(sign, "Sign In Controller", "MVC Rest Controller", "Allows users to sign in to the internet banking system") Component(accounts, "Accounts Summary Controller", "MVC Rest Controller", "Provides customers with a summary of their bank accounts") Component(security, "Security Component", "Spring Bean", "Provides functionality related to singing in, changing passwords, etc.") Component(mbsfacade, "Mainframe Banking System Facade", "Spring Bean", "A facade onto the mainframe banking system.") diff --git a/src/config.js b/src/config.js index 24fe5b4d08..f438318c7c 100644 --- a/src/config.js +++ b/src/config.js @@ -21,7 +21,7 @@ export const updateCurrentConfig = (siteCfg, _directives) => { const d = _directives[i]; sanitize(d); - // Apply the data from the directive where the the overrides the themeVaraibles + // Apply the data from the directive where the the overrides the themeVariables sumOfDirectives = assignWithDepth(sumOfDirectives, d); } @@ -67,7 +67,7 @@ export const setSiteConfig = (conf) => { return siteConfig; }; -export const saveConfigFromInitilize = (conf) => { +export const saveConfigFromInitialize = (conf) => { configFromInitialize = assignWithDepth({}, conf); }; diff --git a/src/dagre-wrapper/edges.spec.js b/src/dagre-wrapper/edges.spec.js index f087812f8d..627691a8e5 100644 --- a/src/dagre-wrapper/edges.spec.js +++ b/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 otop of box outside point greater then inside point', function () { + it('case 3 - intersection on top of box outside point greater then inside point', function () { const o = { x: 157, y: 39 }; const i = { x: 104, y: 105 }; const node2 = { diff --git a/src/diagrams/flowchart/parser/flow-comments.spec.js b/src/diagrams/flowchart/parser/flow-comments.spec.js index 861d392362..7aeed304cc 100644 --- a/src/diagrams/flowchart/parser/flow-comments.spec.js +++ b/src/diagrams/flowchart/parser/flow-comments.spec.js @@ -58,7 +58,7 @@ describe('[Comments] when parsing', () => { }); it('should handle comments at the end no trailing newline', function () { - const res = flow.parser.parse('graph TD;\n A-->B\n%% Commento'); + const res = flow.parser.parse('graph TD;\n A-->B\n%% Comment'); const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); @@ -73,7 +73,7 @@ describe('[Comments] when parsing', () => { }); it('should handle comments at the end many trailing newlines', function () { - const res = flow.parser.parse('graph TD;\n A-->B\n%% Commento\n\n\n'); + const res = flow.parser.parse('graph TD;\n A-->B\n%% Comment\n\n\n'); const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); diff --git a/src/diagrams/flowchart/parser/flow.spec.js b/src/diagrams/flowchart/parser/flow.spec.js index b2b01f84f4..6b440da798 100644 --- a/src/diagrams/flowchart/parser/flow.spec.js +++ b/src/diagrams/flowchart/parser/flow.spec.js @@ -12,7 +12,7 @@ describe('parsing a flow chart', function () { flow.parser.yy.clear(); }); - it('should handle a trailing whitespaces after statememnts', function () { + it('should handle a trailing whitespaces after statements', function () { const res = flow.parser.parse('graph TD;\n\n\n %% Comment\n A-->B; \n B-->C;'); const vert = flow.parser.yy.getVertices(); diff --git a/src/diagrams/state/stateDiagram-v2.spec.js b/src/diagrams/state/stateDiagram-v2.spec.js index 701fec62bb..ad224f14da 100644 --- a/src/diagrams/state/stateDiagram-v2.spec.js +++ b/src/diagrams/state/stateDiagram-v2.spec.js @@ -107,8 +107,8 @@ describe('state diagram, ', function () { }); it('handle "as" in state names 2', function () { const str = `stateDiagram-v2 - assembleas - state assembleas + assemblies + state assemblies `; parser.parse(str); @@ -207,14 +207,14 @@ describe('state diagram, ', function () { parser.parse(str); }); - it('should handle state deifintions with separation of id', function () { + it('should handle state definitions with separation of id', function () { const str = `stateDiagram-v2\n state "Long state description" as state1 `; parser.parse(str); }); - it('should handle state deifintions with separation of id', function () { + it('should handle state definitions with separation of id', function () { const str = `stateDiagram-v2 state "Not Shooting State" as NotShooting { state "Idle mode" as Idle diff --git a/src/diagrams/state/stateDiagram.spec.js b/src/diagrams/state/stateDiagram.spec.js index 0b2b30a1e1..144dd16e58 100644 --- a/src/diagrams/state/stateDiagram.spec.js +++ b/src/diagrams/state/stateDiagram.spec.js @@ -122,8 +122,8 @@ describe('state diagram, ', function () { }); it('handle "as" in state names 2', function () { const str = `stateDiagram - assembleas - state assembleas + assemblies + state assemblies `; parser.parse(str); @@ -222,14 +222,14 @@ describe('state diagram, ', function () { parser.parse(str); }); - it('should handle state deifintions with separation of id', function () { + it('should handle state defintions with separation of id', function () { const str = `stateDiagram\n state "Long state description" as state1 `; parser.parse(str); }); - it('should handle state deifintions with separation of id', function () { + it('should handle state defintions with separation of id', function () { const str = `stateDiagram state "Not Shooting State" as NotShooting { state "Idle mode" as Idle diff --git a/src/mermaid.js b/src/mermaid.js index 5181eb557f..3ea510a7f4 100644 --- a/src/mermaid.js +++ b/src/mermaid.js @@ -90,7 +90,7 @@ const initThrowsErrors = function () { mermaidAPI.updateSiteConfig({ gantt: mermaid.ganttConfig }); } - const idGeneratior = new utils.initIdGeneratior(conf.deterministicIds, conf.deterministicIDSeed); + const idGenerator = new utils.initIdGenerator(conf.deterministicIds, conf.deterministicIDSeed); let txt; @@ -105,7 +105,7 @@ const initThrowsErrors = function () { continue; } - const id = `mermaid-${idGeneratior.next()}`; + const id = `mermaid-${idGenerator.next()}`; // Fetch the graph definition including tags txt = element.innerHTML; @@ -189,7 +189,7 @@ if (typeof document !== 'undefined') { } /** - * ## setParseErrorHandler Alternativet to directly setting parseError using: + * ## setParseErrorHandler Alternative to directly setting parseError using: * * ```js * mermaid.parseError = function(err,hash){= diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index efa93791a8..91c06c2b9c 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -272,7 +272,7 @@ const render = function (id, _txt, cb, container) { // let d3Iframe; let root = select('body'); - // In regular execurtion the container will be the div with a mermaid class + // In regular execution the container will be the div with a mermaid class if (typeof container !== 'undefined') { if (cnf.securityLevel === 'sandbox') { // IF we are in sandboxed mode, we do everyting mermaid related @@ -317,7 +317,7 @@ const render = function (id, _txt, cb, container) { } else { // No container was provided // If there is an existsing element with the id, we remove it - // this likley a previously rendered diagram + // this likely a previously rendered diagram const existingSvg = document.getElementById(id); if (existingSvg) { existingSvg.remove(); @@ -741,7 +741,7 @@ function initialize(options) { } } // Set default options - configApi.saveConfigFromInitilize(options); + configApi.saveConfigFromInitialize(options); if (options && options.theme && theme[options.theme]) { // Todo merge with user options diff --git a/src/utils.js b/src/utils.js index 7d44e7f7a2..2cbb8b7723 100644 --- a/src/utils.js +++ b/src/utils.js @@ -945,7 +945,7 @@ export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth) // Ensure the viewBox includes the whole svgBounds area with extra space for padding const vBox = `0 0 ${width} ${height}`; log.debug( - 'Grpah.label', + 'Graph.label', graph._label, 'swidth', sWidth, @@ -966,7 +966,7 @@ export const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth) svgElem.select('g').attr('transform', `translate(${tx}, ${ty})`); }; -export const initIdGeneratior = class iterator { +export const initIdGenerator = class iterator { constructor(deterministic, seed) { this.deterministic = deterministic; this.seed = seed; @@ -1080,7 +1080,7 @@ export default { memoize, runFunc, entityDecode, - initIdGeneratior, + initIdGenerator: initIdGenerator, directiveSanitizer, sanitizeCss, }; diff --git a/src/utils.spec.js b/src/utils.spec.js index 2e8d335d0f..b079beeeb1 100644 --- a/src/utils.spec.js +++ b/src/utils.spec.js @@ -302,7 +302,7 @@ describe('when calculating SVG size', function () { describe('when initializing the id generator', function () { it('should return a random number generator based on Date', function (done) { - const idGenerator = new utils.initIdGeneratior(false); + const idGenerator = new utils.initIdGenerator(false); expect(typeof idGenerator.next).toEqual('function'); const lastId = idGenerator.next(); setTimeout(() => { @@ -312,7 +312,7 @@ describe('when initializing the id generator', function () { }); it('should return a non random number generator', function () { - const idGenerator = new utils.initIdGeneratior(true); + const idGenerator = new utils.initIdGenerator(true); expect(typeof idGenerator.next).toEqual('function'); const start = 0; const lastId = idGenerator.next(); @@ -321,7 +321,7 @@ describe('when initializing the id generator', function () { }); it('should return a non random number generator based on seed', function () { - const idGenerator = new utils.initIdGeneratior(true, 'thisIsASeed'); + const idGenerator = new utils.initIdGenerator(true, 'thisIsASeed'); expect(typeof idGenerator.next).toEqual('function'); const start = 11; const lastId = idGenerator.next();