From bd17c854778b782b2de4f4cb84ef359f87bd50f5 Mon Sep 17 00:00:00 2001 From: szego Date: Tue, 13 Oct 2015 08:32:35 -0300 Subject: [PATCH] bugfix / checks for disabledElements in Renderer The script now checks for disabledElements in the Render and disables the appropriate functions. --- lib/marked.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/marked.js b/lib/marked.js index 30daebdf6d..f8d81bc20d 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -766,7 +766,11 @@ InlineLexer.prototype.mangle = function(text) { */ function Renderer(options) { - this.options = options || {}; + this.options = options || {}; + + for(var i = 0; i < this.options.disabledElements.length; i++) { + this[this.options.disabledElements[i]] = noop; + } } Renderer.prototype.code = function(code, lang, escaped) {