Merge branch 'master' into develop

This commit is contained in:
Knut Sveidqvist
2023-10-20 14:33:07 +02:00
5 changed files with 18 additions and 9 deletions

View File

@@ -58,8 +58,10 @@
</head> </head>
<body> <body>
<pre id="diagram" class="mermaid"> <pre id="diagram" class="mermaid">
classDiagram flowchart-elk LR
`Class<img src=x onerror=alert(1)>` <|-- `Class2<img src=x onerror=alert(2)>` subgraph example
node
end
</pre> </pre>
<pre id="diagram" class="mermaid2"> <pre id="diagram" class="mermaid2">
flowchart flowchart

View File

@@ -1,6 +1,6 @@
{ {
"name": "mermaid", "name": "mermaid",
"version": "10.5.0", "version": "10.5.1",
"description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "description": "Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"type": "module", "type": "module",
"module": "./dist/mermaid.core.mjs", "module": "./dist/mermaid.core.mjs",

View File

@@ -803,8 +803,14 @@ const insertChildren = (nodeArray, parentLookupDb) => {
*/ */
export const draw = async function (text, id, _version, diagObj) { export const draw = async function (text, id, _version, diagObj) {
// Add temporary render element
diagObj.db.clear();
nodeDb = {}; nodeDb = {};
portPos = {}; portPos = {};
diagObj.db.setGen('gen-2');
// Parse the graph definition
diagObj.parser.parse(text);
const renderEl = select('body').append('div').attr('style', 'height:400px').attr('id', 'cy'); const renderEl = select('body').append('div').attr('style', 'height:400px').attr('id', 'cy');
let graph = { let graph = {
id: 'root', id: 'root',

View File

@@ -6,8 +6,8 @@ import Mermaid from './Mermaid.vue';
import Contributors from '../components/Contributors.vue'; import Contributors from '../components/Contributors.vue';
// @ts-ignore // @ts-ignore
import HomePage from '../components/HomePage.vue'; import HomePage from '../components/HomePage.vue';
// @ts-ignore // // @ts-ignore
import TopBar from '../components/TopBar.vue'; // import TopBar from '../components/TopBar.vue';
import { getRedirect } from './redirect.js'; import { getRedirect } from './redirect.js';
@@ -21,7 +21,8 @@ export default {
...DefaultTheme, ...DefaultTheme,
Layout() { Layout() {
return h(Theme.Layout, null, { return h(Theme.Layout, null, {
'home-hero-before': () => h(TopBar), // Keeping this as comment as it took a lot of time to figure out how to add a component to the top bar.
// 'home-hero-before': () => h(TopBar),
'home-features-after': () => h(HomePage), 'home-features-after': () => h(HomePage),
}); });
}, },

View File

@@ -31,7 +31,7 @@ features:
- title: 🏆 Award winning! - title: 🏆 Award winning!
details: 2019 JavaScript Open Source Award winner for "The Most Exciting Use of Technology". details: 2019 JavaScript Open Source Award winner for "The Most Exciting Use of Technology".
link: https://osawards.com/javascript/2019 link: https://osawards.com/javascript/2019
- title: 🎉 We are on Product Hunt! - title: 🥰 Mermaid + Mermaid Chart
details: We would love any and all support from the Mermaid community! details: Mermaid Chart is a major supporter of the Mermaid project.
link: https://www.producthunt.com/posts/mermaid-chart link: https://www.mermaidchart.com/
--- ---