Compare commits

...

4 Commits

Author SHA1 Message Date
Knut Sveidqvist
0c0468123f Release 9.1.7 2022-09-13 19:55:34 +02:00
ashishj
50da58afe0 Fix for broken rendering test 2022-09-13 19:18:12 +02:00
Knut Sveidqvist
0f56c9a85d Fix for issue #3428, load the configured diagrams even when initialize has not been called. 2022-09-09 13:37:37 +02:00
Knut Sveidqvist
e5212c25f5 Merge pull request #3398 from mermaid-js/3395_fix_error_handling
Re-enabling error graph
2022-09-05 15:13:49 +02:00
4 changed files with 10 additions and 4 deletions

View File

@@ -18,7 +18,7 @@
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css"> -->
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css">
<script src="//cdn.jsdelivr.net/npm/mermaid@9.1.6/dist/mermaid.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/mermaid@9.1.7/dist/mermaid.min.js"></script>
<!-- <script src="http://localhost:9000/mermaid.js"></script> -->
<script>
// prettier-ignore

View File

@@ -1,6 +1,6 @@
{
"name": "mermaid",
"version": "9.1.6",
"version": "9.1.7",
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"main": "dist/mermaid.min.js",
"module": "dist/mermaid.esm.min.mjs",
@@ -122,4 +122,4 @@
"**/*.css",
"**/*.scss"
]
}
}

View File

@@ -92,7 +92,9 @@ const drawCommits = (svg, commits, modifyGraph) => {
if (modifyGraph) {
let typeClass;
let commitSymbolType =
typeof commit.customType !== 'undefined' ? commit.customType : commit.type;
typeof commit.customType !== 'undefined' && commit.customType !== ''
? commit.customType
: commit.type;
switch (commitSymbolType) {
case commitType.NORMAL:
typeClass = 'commit-normal';

View File

@@ -146,6 +146,10 @@ export const decodeEntities = function (text) {
* @returns {any}
*/
const render = function (id, _txt, cb, container) {
if (!hasLoadedDiagrams) {
addDiagrams();
hasLoadedDiagrams = true;
}
configApi.reset();
let txt = _txt.replace(/\r\n?/g, '\n'); // parser problems on CRLF ignore all CR and leave LF;;
const graphInit = utils.detectInit(txt);