Merge branch 'develop' into sidv/typescript

* develop:
  Fix #3009 Update main
  #3243 Adding disabled testcase for diagram with leading \n
This commit is contained in:
Sidharth Vinod
2022-08-21 19:24:15 +05:30
3 changed files with 13 additions and 4 deletions

View File

@@ -42,8 +42,8 @@ export const imgSnapshotTest = (graphStr, _options, api = false, validation) =>
if (!options.fontSize) { if (!options.fontSize) {
options.fontSize = '16px'; options.fontSize = '16px';
} }
// const useAppli = Cypress.env('useAppli'); const useAppli = Cypress.env('useAppli');
const useAppli = false; //const useAppli = false;
const branch = Cypress.env('codeBranch'); const branch = Cypress.env('codeBranch');
cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot'); cy.log('Hello ' + useAppli ? 'Appli' : 'image-snapshot');
const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-'); const name = (options.name || cy.state('runnable').fullTitle()).replace(/\s+/g, '-');

View File

@@ -2,11 +2,11 @@
"name": "mermaid", "name": "mermaid",
"version": "9.1.5", "version": "9.1.5",
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"main": "dist/mermaid.core.js", "main": "dist/mermaid.min.js",
"module": "dist/mermaid.esm.min.mjs", "module": "dist/mermaid.esm.min.mjs",
"exports": { "exports": {
".": { ".": {
"require": "./dist/mermaid.core.js", "require": "./dist/mermaid.min.js",
"import": "./dist/mermaid.esm.min.mjs" "import": "./dist/mermaid.esm.min.mjs"
}, },
"./*": "./*" "./*": "./*"

View File

@@ -14,7 +14,16 @@ describe('class diagram, ', function () {
parser.parse(str); parser.parse(str);
}); });
xit('should handle a leading newline axa', function () {
const str = '\nclassDiagram\n' + 'class Car';
try {
parser.parse(str);
// Fail test if above expression doesn't throw anything.
} catch (e) {
expect(true).toBe(false);
}
});
it('should handle relation definitions', function () { it('should handle relation definitions', function () {
const str = const str =
'classDiagram\n' + 'classDiagram\n' +