mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-14 09:44:51 +01:00
Modernization of build environment, better linting, adjustment after stricter static rules, cleanup of package.json
This commit is contained in:
@@ -2,15 +2,10 @@
|
||||
* Created by knut on 14-11-18.
|
||||
*/
|
||||
describe('when parsing an info graph it',function() {
|
||||
var parseError;
|
||||
var ex;
|
||||
beforeEach(function () {
|
||||
ex = require('./parser/example').parser;
|
||||
ex.yy = require('./exampleDb');
|
||||
parseError = function(err, hash) {
|
||||
log.debug('Syntax error:' + err);
|
||||
};
|
||||
//ex.yy.parseError = parseError;
|
||||
});
|
||||
|
||||
it('should handle an info definition', function () {
|
||||
|
||||
@@ -6,6 +6,7 @@ var message = '';
|
||||
var info = false;
|
||||
|
||||
exports.setMessage = function(txt){
|
||||
log.debug('Setting message to: '+txt);
|
||||
message = txt;
|
||||
};
|
||||
|
||||
@@ -22,5 +23,5 @@ exports.getInfo = function(){
|
||||
};
|
||||
|
||||
exports.parseError = function(err,hash){
|
||||
mermaidAPI.parseError(err,hash);
|
||||
global.mermaidAPI.parseError(err,hash);
|
||||
};
|
||||
@@ -14,14 +14,13 @@ exports.draw = function (txt, id, ver) {
|
||||
var parser;
|
||||
parser = exampleParser.parser;
|
||||
parser.yy = db;
|
||||
|
||||
log.debug('Renering example diagram');
|
||||
// Parse the graph definition
|
||||
parser.parse(txt);
|
||||
|
||||
// Fetch the default direction, use TD if none was found
|
||||
var svg = d3.select('#'+id);
|
||||
|
||||
var textstring = 'mermaid!';
|
||||
var g = svg.append('g');
|
||||
|
||||
g.append('text') // text label for the x axis
|
||||
|
||||
Reference in New Issue
Block a user