Skip to content

Commit

Permalink
bugfix / checks for disabledElements in Renderer
Browse files Browse the repository at this point in the history
The script now checks for disabledElements in the Render and disables
the appropriate functions.
  • Loading branch information
szego committed Oct 13, 2015
1 parent d13a57b commit bd17c85
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bd17c85

Please sign in to comment.