From 3fe38237e6dc3cce252c348ec4459465b4ec4252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Westr=C3=B6m?= Date: Wed, 14 Jan 2015 00:03:41 +0100 Subject: [PATCH] New config attribute, htmlLabels --- src/main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 8fa9ab810..f45deb761 100644 --- a/src/main.js +++ b/src/main.js @@ -94,6 +94,7 @@ var equals = function (val, variable){ global.mermaid = { startOnLoad:true, + htmlLabels:true, init:function(){ init(); }, @@ -109,6 +110,12 @@ exports.contentLoaded = function(){ // Check state of start config mermaid namespece //console.log('global.mermaid.startOnLoad',global.mermaid.startOnLoad); //console.log('mermaid_config',mermaid_config); + if (typeof mermaid_config !== 'undefined') { + if (equals(false, mermaid_config.htmlLabels)) { + global.mermaid.htmlLabels = false; + } + } + if(global.mermaid.startOnLoad) { // For backwards compatability reasons also check mermaid_config variable @@ -128,7 +135,7 @@ exports.contentLoaded = function(){ if(typeof document !== 'undefined'){ /** - * Wait for coument loaded before starting the execution + * Wait for document loaded before starting the execution */ document.addEventListener('DOMContentLoaded', function(){ exports.contentLoaded();