Skip to content

Commit

Permalink
fix: typo for source
Browse files Browse the repository at this point in the history
  • Loading branch information
yutotnh committed Jun 27, 2022
1 parent 5619b54 commit 4d4b77f
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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.")
Expand Down
4 changes: 2 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -67,7 +67,7 @@ export const setSiteConfig = (conf) => {
return siteConfig;
};

export const saveConfigFromInitilize = (conf) => {
export const saveConfigFromInitialize = (conf) => {
configFromInitialize = assignWithDepth({}, conf);
};

Expand Down
2 changes: 1 addition & 1 deletion src/dagre-wrapper/edges.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 2 additions & 2 deletions src/diagrams/flowchart/parser/flow-comments.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/diagrams/flowchart/parser/flow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions src/diagrams/state/stateDiagram-v2.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/diagrams/state/stateDiagram.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/mermaid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down Expand Up @@ -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){=
Expand Down
6 changes: 3 additions & 3 deletions src/mermaidAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -1080,7 +1080,7 @@ export default {
memoize,
runFunc,
entityDecode,
initIdGeneratior,
initIdGenerator: initIdGenerator,
directiveSanitizer,
sanitizeCss,
};
6 changes: 3 additions & 3 deletions src/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand All @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 4d4b77f

Please sign in to comment.