Skip to content
Permalink
Browse files

Replaced Remarkable with Marked

  • Loading branch information...
davidmerfield committed Mar 15, 2019
1 parent e938481 commit 72a84af581f0ee618d39ce71a70c341f43ac82e4
Showing with 3 additions and 42 deletions.
  1. +3 −4 app/helper/email/index.js
  2. +0 −37 package-lock.json
  3. +0 −1 package.json
@@ -7,8 +7,7 @@ var assert = require("assert");
var logg = require("../logg");
var log = new logg("Email");
var Mustache = require("mustache");
var Remarkable = require("remarkable");
var md = new Remarkable();
var marked = require("marked");

var Mailgun = require("mailgun-js");
var mailgun = new Mailgun({
@@ -123,7 +122,7 @@ function send(locals, messageFile, to, callback) {
var subject = Mustache.render(lines[0] || "", locals);
var message = lines.slice(2).join("\n") || "";

var html = md.render(Mustache.render(message, locals));
var html = marked(Mustache.render(message, locals));

var email = {
html: html,
@@ -144,7 +143,7 @@ function send(locals, messageFile, to, callback) {
console.log("Email not sent in development environment:", email);
return callback();
}

mailgun.messages().send(email, function(err, body) {
if (err) {
console.log("Error: Mailgun failed to send transactional email:", err);

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -57,7 +57,6 @@
"redis": "^2.8.0",
"redlock": "^3.1.2",
"reds": "^0.2.5",
"remarkable": "^1.6.0",
"request": "^2.72.0",
"sharp": "^0.21.1",
"simple-git": "^1.102.0",

0 comments on commit 72a84af

Please sign in to comment.
You can’t perform that action at this time.