From 5d177ef6928548f64cd815678d8be15785d0520d Mon Sep 17 00:00:00 2001 From: Krystian Chmura Date: Tue, 1 Mar 2022 16:59:29 +0100 Subject: [PATCH] fix: markdown parsing after marked library version dump broken by 802d32f757b82d71407e8f1b10d1fa2cc84ecbcd --- dev-portal/src/services/get-fragments.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-portal/src/services/get-fragments.jsx b/dev-portal/src/services/get-fragments.jsx index 352d622a5..754fbdd81 100644 --- a/dev-portal/src/services/get-fragments.jsx +++ b/dev-portal/src/services/get-fragments.jsx @@ -12,7 +12,7 @@ import { observable } from 'mobx' // markdown parsing import frontmatter from 'front-matter' -import marked from 'marked' +import { marked } from 'marked' export const fragments = observable({}) @@ -39,7 +39,7 @@ function loadHtml (path, fragment) { window.fetch(path).then(response => response.text().then(text => { const parsedMarkdown = frontmatter(text) - const html = marked(parsedMarkdown.body, { + const html = marked.parse(parsedMarkdown.body, { headerPrefix: 'header-', silent: true })