mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
feature(package) marked -> markdown-it
This commit is contained in:
parent
82d4c5ab29
commit
0cb501c39c
2 changed files with 4 additions and 9 deletions
|
|
@ -12,8 +12,7 @@
|
|||
mellow = require('mellow'),
|
||||
pipe = require('pipe-io'),
|
||||
ponse = require('ponse'),
|
||||
|
||||
marked = require('marked');
|
||||
markdown = require('markdown-it')();
|
||||
|
||||
module.exports = function(name, request, callback) {
|
||||
var query,
|
||||
|
|
@ -38,7 +37,6 @@
|
|||
break;
|
||||
|
||||
case 'PUT':
|
||||
|
||||
pipe.getBody(request, function(error, data) {
|
||||
if (error)
|
||||
Util.exec(callback, error);
|
||||
|
|
@ -53,12 +51,9 @@
|
|||
var md;
|
||||
|
||||
process.nextTick(function() {
|
||||
if (marked)
|
||||
md = marked(data);
|
||||
else
|
||||
md = '<pre>' + data + '</pre>';
|
||||
md = markdown.render(data);
|
||||
|
||||
Util.exec(callback, null, md);
|
||||
callback(null, md);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
"http-auth": "~2.2.3",
|
||||
"jag": "~1.0.0",
|
||||
"join-io": "~1.3.0",
|
||||
"marked": "~0.3.2",
|
||||
"markdown-it": "~3.0.7",
|
||||
"mellow": "~1.0.0",
|
||||
"minify": "~1.4.0",
|
||||
"minimist": "~1.1.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue