Remove parseError properties
This commit is contained in:
parent
167368d508
commit
bdf9b33b10
|
@ -23,7 +23,3 @@ exports.setInfo = function (inf) {
|
||||||
exports.getInfo = function () {
|
exports.getInfo = function () {
|
||||||
return info
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.parseError = function (err, hash) {
|
|
||||||
global.mermaidAPI.parseError(err, hash)
|
|
||||||
}
|
|
||||||
|
|
|
@ -400,7 +400,3 @@ exports.indexNodes = function () {
|
||||||
exports.getSubGraphs = function () {
|
exports.getSubGraphs = function () {
|
||||||
return subGraphs
|
return subGraphs
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.parseError = function (err, hash) {
|
|
||||||
global.mermaidAPI.parseError(err, hash)
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,9 +9,6 @@ describe('when parsing ', function () {
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
flow.parser.yy = require('../graphDb')
|
flow.parser.yy = require('../graphDb')
|
||||||
flow.parser.yy.clear()
|
flow.parser.yy.clear()
|
||||||
/* flow.parser.parse.parseError= function parseError(str, hash) {
|
|
||||||
log.debugconsole.log(str);
|
|
||||||
} */
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should handle a nodes and edges', function () {
|
it('should handle a nodes and edges', function () {
|
||||||
|
|
|
@ -352,7 +352,3 @@ var compileTasks = function () {
|
||||||
}
|
}
|
||||||
return allProcessed
|
return allProcessed
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.parseError = function (err, hash) {
|
|
||||||
global.mermaidAPI.parseError(err, hash)
|
|
||||||
}
|
|
||||||
|
|
|
@ -97,10 +97,6 @@ module.exports.setTitle = function (titleText) {
|
||||||
title = titleText
|
title = titleText
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.parseError = function (err, hash) {
|
|
||||||
global.mermaidAPI.parseError(err, hash)
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports.apply = function (param) {
|
module.exports.apply = function (param) {
|
||||||
if (param instanceof Array) {
|
if (param instanceof Array) {
|
||||||
param.forEach(function (item) {
|
param.forEach(function (item) {
|
||||||
|
|
|
@ -175,23 +175,18 @@ if (typeof document !== 'undefined') {
|
||||||
}
|
}
|
||||||
|
|
||||||
const mermaid = {
|
const mermaid = {
|
||||||
mermaidAPI,
|
|
||||||
startOnLoad: true,
|
startOnLoad: true,
|
||||||
htmlLabels: true,
|
htmlLabels: true,
|
||||||
|
|
||||||
|
mermaidAPI,
|
||||||
|
parse: mermaidAPI.parse,
|
||||||
|
render: mermaidAPI.render,
|
||||||
|
|
||||||
init,
|
init,
|
||||||
initialize,
|
initialize,
|
||||||
version,
|
version,
|
||||||
parse: mermaidAPI.parse,
|
|
||||||
|
|
||||||
parseError: function (err) {
|
contentLoaded
|
||||||
log.debug('Mermaid Syntax error:')
|
|
||||||
log.debug(err)
|
|
||||||
},
|
|
||||||
render: mermaidAPI.render,
|
|
||||||
|
|
||||||
contentLoaded,
|
|
||||||
eventEmitter: mermaidAPI.eventEmitter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default mermaid
|
export default mermaid
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
* returns a svg element for the graph. It is is then up to the user of the API to make use of the svg, either insert it
|
* returns a svg element for the graph. It is is then up to the user of the API to make use of the svg, either insert it
|
||||||
* somewhere in the page or something completely different.
|
* somewhere in the page or something completely different.
|
||||||
*/
|
*/
|
||||||
import EventEmitter from 'events'
|
|
||||||
|
|
||||||
var Logger = require('./logger')
|
var Logger = require('./logger')
|
||||||
var log = Logger.Log
|
var log = Logger.Log
|
||||||
|
|
||||||
|
@ -38,8 +36,6 @@ var gitGraphRenderer = require('./diagrams/gitGraph/gitGraphRenderer')
|
||||||
var gitGraphAst = require('./diagrams/gitGraph/gitGraphAst')
|
var gitGraphAst = require('./diagrams/gitGraph/gitGraphAst')
|
||||||
var d3 = require('./d3')
|
var d3 = require('./d3')
|
||||||
|
|
||||||
module.exports.eventEmitter = new EventEmitter()
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ## Configuration
|
* ## Configuration
|
||||||
* These are the default options which can be overridden with the initialization call as in the example below:
|
* These are the default options which can be overridden with the initialization call as in the example below:
|
||||||
|
@ -533,21 +529,10 @@ module.exports.getConfig = function () {
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.parseError = function (err, hash) {
|
|
||||||
if (typeof mermaid !== 'undefined') {
|
|
||||||
global.mermaid.parseError(err, hash)
|
|
||||||
} else {
|
|
||||||
log.debug('Mermaid Syntax error:')
|
|
||||||
log.debug(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
global.mermaidAPI = {
|
global.mermaidAPI = {
|
||||||
render: module.exports.render,
|
render: module.exports.render,
|
||||||
parse: module.exports.parse,
|
parse: module.exports.parse,
|
||||||
initialize: module.exports.initialize,
|
initialize: module.exports.initialize,
|
||||||
detectType: utils.detectType,
|
detectType: utils.detectType,
|
||||||
parseError: module.exports.parseError,
|
getConfig: module.exports.getConfig
|
||||||
getConfig: module.exports.getConfig,
|
|
||||||
eventEmitter: module.exports.eventEmitter
|
|
||||||
}
|
}
|
||||||
|
|
1
todo.md
1
todo.md
|
@ -18,4 +18,3 @@
|
||||||
- Replace karma-webpack with karma-babel
|
- Replace karma-webpack with karma-babel
|
||||||
- Webpack generate mermaid.js & mermaid.core.js
|
- Webpack generate mermaid.js & mermaid.core.js
|
||||||
- Stops working for mermaid-live-editor since 7.0.9
|
- Stops working for mermaid-live-editor since 7.0.9
|
||||||
- Change emit parseError to throw parseError
|
|
||||||
|
|
Loading…
Reference in New Issue