From 1770fd4548ba991e06854a4e2dd556fc55ddb47c Mon Sep 17 00:00:00 2001 From: Thomas Reggi Date: Sat, 22 Aug 2015 14:50:09 -0400 Subject: [PATCH] add default empty env object --- lib/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/index.js b/lib/index.js index 6b301e8..db4b9ec 100644 --- a/lib/index.js +++ b/lib/index.js @@ -488,6 +488,7 @@ MarkdownIt.prototype.use = function (plugin /*, params, ... */) { * and then pass updated object to renderer. **/ MarkdownIt.prototype.parse = function (src, env) { + env = (env) ? env : {} var state = new this.core.State(src, this, env); this.core.process(state);