aboutsummaryrefslogtreecommitdiffstats
path: root/lib/showdown/index.js
diff options
context:
space:
mode:
authorVojta Jina2011-05-24 13:57:52 +0200
committerIgor Minar2011-06-06 22:52:01 -0700
commitd05e83992023c0aa8c663ac187529abf45dfe533 (patch)
tree6f69ae45097a8cc9904704c0683a7a71a48c3d1c /lib/showdown/index.js
parent22dee3e27884f357654a470ce2afea08bedcb138 (diff)
downloadangular.js-d05e83992023c0aa8c663ac187529abf45dfe533.tar.bz2
Use node's vm module instead of deprecated process.compile
So that I don't have to watch the warning all the time :-D
Diffstat (limited to 'lib/showdown/index.js')
-rw-r--r--lib/showdown/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/showdown/index.js b/lib/showdown/index.js
index 59a97233..370b93af 100644
--- a/lib/showdown/index.js
+++ b/lib/showdown/index.js
@@ -1,6 +1,7 @@
var fs = require('fs');
+var vm = require('vm');
var filename = __dirname + '/showdown-0.9.js';
var src = fs.readFileSync(filename);
-var Showdown = process.compile(src + '\nShowdown;', filename);
+var Showdown = vm.runInThisContext(src + '\nShowdown;', filename);
exports.Showdown = Showdown;