Commit 2afa1e2b authored by Rubén Beltran del Río's avatar Rubén Beltran del Río 🐝

Substitute markdown for showdown

It has better support for code blocks
parent eccb3cc4
'use strict';
const Fs = require('fs');
const Markdown = require('markdown');
const Mustache = require('mustache');
const Ncp = require('ncp');
const Path = require('path');
const Rimraf = require('rimraf');
const Showdown = require('showdown');
const Util = require('util');
const internals = {
......@@ -126,8 +126,9 @@ module.exports = class Blog {
const postContent = await internals.fs.readFile(postContentPath, { encoding: 'utf8' });
internals.debuglog('Parsing markdown');
const parser = new Showdown.Converter();
posts.push({
html: Markdown.markdown.toHTML(postContent),
html: parser.makeHtml(postContent),
id: i + 1
});
}
......
......@@ -23,11 +23,11 @@
"homepage": "https://github.com/rbdr/blog#readme",
"dependencies": {
"getenv": "0.7.x",
"markdown": "0.5.x",
"minimist": "1.2.x",
"mustache": "2.3.x",
"ncp": "2.0.x",
"rimraf": "2.6.x"
"rimraf": "2.6.x",
"showdown": "1.7.x"
},
"devDependencies": {
"docdash": "0.4.x",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment