diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/models/note.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/models/note.js b/lib/models/note.js index db0493b2..f9a8ec61 100644 --- a/lib/models/note.js +++ b/lib/models/note.js @@ -4,7 +4,7 @@ var fs = require('fs'); var path = require('path'); var LZString = require('lz-string'); -var marked = require('marked'); +var md = require('markdown-it')(); var metaMarked = require('meta-marked'); var cheerio = require('cheerio'); var shortId = require('shortid'); @@ -200,7 +200,7 @@ module.exports = function (sequelize, DataTypes) { if (meta && meta.title && (typeof meta.title == "string" || typeof meta.title == "number")) { title = meta.title; } else { - var $ = cheerio.load(marked(body)); + var $ = cheerio.load(md.render(body)); var h1s = $("h1"); if (h1s.length > 0 && h1s.first().text().split('\n').length == 1) title = h1s.first().text(); |