Using marked instead of markdown

This commit is contained in:
Anh Hong 2020-05-13 13:14:39 +07:00 committed by hong4rc
parent 38a04bdae5
commit d01271e654
6 changed files with 12 additions and 24 deletions

View file

@ -1,6 +1,7 @@
var _ = require('underscore');
var Q = require('q');
var Backbone = require('backbone');
var marked = require('marked');
var Main = require('../app');
var intl = require('../intl');
@ -356,7 +357,7 @@ var ModalAlert = ContainedBase.extend({
render: function() {
var HTML = (this.JSON.markdown) ?
require('markdown').markdown.toHTML(this.JSON.markdown) :
marked(this.JSON.markdown) :
this.template(this.JSON);
// one more hack -- allow adding custom random HTML if specified
if (this.options._dangerouslyInsertHTML) {