3 var processText
= require('gitter-web-text-processor');
4 var StatusError
= require('statuserror');
6 function markdownPreview(req
, res
, next
) {
8 return next(new StatusError(401));
10 return processText(req
.body
.text
)
11 .then(function(parsed
) {
12 res
.set('Content-Type', 'text/html');
13 res
.send(parsed
.html
);
18 module
.exports
= markdownPreview
;