mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Fix for subgraphs
This commit is contained in:
parent
0ed5a01756
commit
c966aad496
4
dist/mermaid.full.js
vendored
4
dist/mermaid.full.js
vendored
@ -26317,6 +26317,9 @@ exports.addSubGraph = function (list, title) {
|
||||
|
||||
return a.filter(function(item) {
|
||||
var type = typeof item;
|
||||
if(item===' '){
|
||||
return false;
|
||||
}
|
||||
if(type in prims)
|
||||
return prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true);
|
||||
else
|
||||
@ -26327,7 +26330,6 @@ exports.addSubGraph = function (list, title) {
|
||||
var subG = [];
|
||||
|
||||
subG = uniq(subG.concat.apply(subG,list));
|
||||
//console.log(subG);
|
||||
|
||||
subGraphs.push({nodes:subG,title:title});
|
||||
};
|
||||
|
2
dist/mermaid.full.min.js
vendored
2
dist/mermaid.full.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/mermaid.slim.js
vendored
4
dist/mermaid.slim.js
vendored
@ -26285,6 +26285,9 @@ exports.addSubGraph = function (list, title) {
|
||||
|
||||
return a.filter(function(item) {
|
||||
var type = typeof item;
|
||||
if(item===' '){
|
||||
return false;
|
||||
}
|
||||
if(type in prims)
|
||||
return prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true);
|
||||
else
|
||||
@ -26295,7 +26298,6 @@ exports.addSubGraph = function (list, title) {
|
||||
var subG = [];
|
||||
|
||||
subG = uniq(subG.concat.apply(subG,list));
|
||||
//console.log(subG);
|
||||
|
||||
subGraphs.push({nodes:subG,title:title});
|
||||
};
|
||||
|
2
dist/mermaid.slim.min.js
vendored
2
dist/mermaid.slim.min.js
vendored
File diff suppressed because one or more lines are too long
@ -223,6 +223,9 @@ exports.addSubGraph = function (list, title) {
|
||||
|
||||
return a.filter(function(item) {
|
||||
var type = typeof item;
|
||||
if(item===' '){
|
||||
return false;
|
||||
}
|
||||
if(type in prims)
|
||||
return prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true);
|
||||
else
|
||||
@ -233,7 +236,6 @@ exports.addSubGraph = function (list, title) {
|
||||
var subG = [];
|
||||
|
||||
subG = uniq(subG.concat.apply(subG,list));
|
||||
//console.log(subG);
|
||||
|
||||
subGraphs.push({nodes:subG,title:title});
|
||||
};
|
||||
|
@ -348,7 +348,7 @@ describe('when parsing ',function(){
|
||||
});
|
||||
|
||||
it('should handle subgraphs',function(){
|
||||
var res = flow.parser.parse('graph TD\nA-->B\nsubgraph myTitle\nc-->d\nend\n');
|
||||
var res = flow.parser.parse('graph TD\nA-->B\nsubgraph myTitle\n\n c-->d \nend\n');
|
||||
|
||||
var vert = flow.parser.yy.getVertices();
|
||||
var edges = flow.parser.yy.getEdges();
|
||||
|
@ -112,7 +112,12 @@
|
||||
end
|
||||
|
||||
</div>
|
||||
<div class="mermaid2">graph TB
|
||||
<div class="mermaid">graph TB
|
||||
subgraph one
|
||||
a1-->a2
|
||||
end
|
||||
</div>
|
||||
<div class="mermaid">graph TB
|
||||
subgraph one
|
||||
a1-->a2
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user