fix(deps): fix breaking changes for marked 3.0.4 -> 4.0.10

This commit is contained in:
Ash Monty
2022-02-20 21:21:13 +01:00
parent 352f433eaa
commit 2a3c9ba78e
2 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ const router = new Router();
const fs = require('fs');
const path = require('path');
const marked = require('marked');
const { marked } = require('marked');
const matter = require('gray-matter');
const postList = () => {
@@ -96,7 +96,7 @@ router.get('/:slug', async (request, response, next) => {
.replace(/(?<=<iframe src="https:\/\/www\.youtube-nocookie\.com\/embed\/.{11})\)/g, '" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>');
// Convert the content into HTML
const htmlPost = marked(content);
const htmlPost = marked.parse(content);
response.render('blog/blogpost', {
layout: 'blog-opengraph',

View File

@@ -4,7 +4,7 @@ const router = new Router();
const fs = require('fs');
const path = require('path');
const marked = require('marked');
const { marked } = require('marked');
router.get('/', async (request, response) => {
response.redirect('/docs/welcome');
@@ -56,7 +56,7 @@ router.get('/:slug', async (request, response, next) => {
.replace(/(?<=<iframe src="https:\/\/www\.youtube-nocookie\.com\/embed\/.{11})\)/g, '" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>');
// Convert the content into HTML
content = marked(content);
content = marked.parse(content);
// A boolean to show the quick links grid or not.
let showQuickLinks = false;