Remove render2 method

This commit is contained in:
Tyler Long 2018-03-11 22:23:26 +08:00
parent 297fa7a069
commit 0d0cdd0542

View File

@ -470,24 +470,6 @@ const render = function (id, txt, cb, container) {
return svgCode return svgCode
} }
function render2 (id, text, cb, containerElement) {
try {
if (arguments.length === 1) {
text = id
id = 'mermaidId0'
}
if (typeof document === 'undefined') {
// Todo handle rendering serverside using phantomjs
} else {
// In browser
return render(id, text, cb, containerElement)
}
} catch (e) {
logger.error(e)
}
}
const setConf = function (cnf) { const setConf = function (cnf) {
// Top level initially mermaid, gflow, sequenceDiagram and gantt // Top level initially mermaid, gflow, sequenceDiagram and gantt
const lvl1Keys = Object.keys(cnf) const lvl1Keys = Object.keys(cnf)
@ -523,7 +505,7 @@ function getConfig () {
} }
const mermaidAPI = { const mermaidAPI = {
render: render2, render,
parse, parse,
initialize, initialize,
detectType: utils.detectType, detectType: utils.detectType,