mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-03 04:14:15 +01:00
Api for validating the syntax without rendering
This commit is contained in:
@@ -22,15 +22,4 @@ describe('when parsing an info graph it',function() {
|
||||
|
||||
ex.parse(str);
|
||||
});
|
||||
|
||||
it('should handle an showMessage statement definition', function () {
|
||||
var str = 'info\nshowInfo';
|
||||
|
||||
try{
|
||||
ex.parse(str);
|
||||
}
|
||||
catch(err){
|
||||
console.log('Caught'+err.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -188,11 +188,7 @@ exports.getClasses = function (text, isDot) {
|
||||
parser.yy = graph;
|
||||
|
||||
// Parse the graph definition
|
||||
try{
|
||||
parser.parse(text);
|
||||
}
|
||||
catch(err){
|
||||
}
|
||||
parser.parse(text);
|
||||
|
||||
var classDefStylesObj = {};
|
||||
var classDefStyleStr = '';
|
||||
|
||||
@@ -245,13 +245,8 @@ module.exports.setConf = function(cnf){
|
||||
*/
|
||||
module.exports.draw = function (text, id) {
|
||||
sq.yy.clear();
|
||||
//console.log(text);
|
||||
try{
|
||||
sq.parse(text+'\n');
|
||||
}
|
||||
catch(err){
|
||||
sq.parse(text+'\n');
|
||||
|
||||
}
|
||||
exports.bounds.init();
|
||||
var diagram = d3.select('#'+id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user