diff --git a/demos/index.html b/demos/index.html
index 0abe627a7..2aa749b9d 100644
--- a/demos/index.html
+++ b/demos/index.html
@@ -65,7 +65,7 @@ Enterprise_Boundary(b0, "BankBoundary0") {
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 @@ Enterprise_Boundary(b0, "BankBoundary0") {
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 24fe5b4d0..f438318c7 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 f087812f8..627691a8e 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 861d39236..7aeed304c 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 b2b01f84f..6b440da79 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 701fec62b..ad224f14d 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 0b2b30a1e..144dd16e5 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 5181eb557..3ea510a7f 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 efa93791a..91c06c2b9 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 7d44e7f7a..2cbb8b772 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 2e8d335d0..b079beeeb 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();