diff --git a/src/diagrams/sequenceDiagram/sequenceDiagram.spec.js b/src/diagrams/sequenceDiagram/sequenceDiagram.spec.js index 04ba2bbee..4aba15459 100644 --- a/src/diagrams/sequenceDiagram/sequenceDiagram.spec.js +++ b/src/diagrams/sequenceDiagram/sequenceDiagram.spec.js @@ -730,8 +730,6 @@ describe('when rendering a sequenceDiagram', function () { parser.yy = sequenceDb parser.yy.clear() - delete global.mermaid_config - NewD3 = function () { const o = { append: function () { diff --git a/src/mermaid.js b/src/mermaid.js index d141265e1..59cb2580b 100644 --- a/src/mermaid.js +++ b/src/mermaid.js @@ -66,9 +66,6 @@ const init = function () { : nodes instanceof window.Node ? [nodes] : nodes // Last case - sequence config was passed pick next - if (typeof global.mermaid_config !== 'undefined') { - mermaidAPI.initialize(global.mermaid_config) - } logger.debug('Start On Load before: ' + mermaid.startOnLoad) if (typeof mermaid.startOnLoad !== 'undefined') { logger.debug('Start On Load inner: ' + mermaid.startOnLoad) @@ -133,26 +130,12 @@ const initialize = function (config) { */ const contentLoaded = function () { let config - // Check state of start config mermaid namespace - if (typeof global.mermaid_config !== 'undefined') { - if (global.mermaid_config.htmlLabels === false) { - mermaid.htmlLabels = false - } - } if (mermaid.startOnLoad) { - // For backwards compatability reasons also check mermaid_config variable - if (typeof global.mermaid_config !== 'undefined') { - // Check if property startOnLoad is set - if (global.mermaid_config.startOnLoad === true) { - mermaid.init() - } - } else { - // No config found, do check API config - config = mermaidAPI.getConfig() - if (config.startOnLoad) { - mermaid.init() - } + // No config found, do check API config + config = mermaidAPI.getConfig() + if (config.startOnLoad) { + mermaid.init() } } else { if (typeof mermaid.startOnLoad === 'undefined') { diff --git a/src/mermaid.spec.js b/src/mermaid.spec.js index 433ba8863..37e3c5516 100644 --- a/src/mermaid.spec.js +++ b/src/mermaid.spec.js @@ -6,19 +6,8 @@ import flowRenderer from './diagrams/flowchart/flowRenderer' describe('when using mermaid and ', function () { describe('when detecting chart type ', function () { - it('should not start rendering with mermaid_config.startOnLoad set to false', function () { - global.mermaid_config = { startOnLoad: false } - - document.body.innerHTML = '