Skip to content

Commit

Permalink
Fix: prevent truncating of page body (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderleegs authored Sep 16, 2021
1 parent 1b79f8b commit f35acfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/markdown-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const yaml = require("yaml")

const retrieveDataFromMarkdown = (fileContent) => {
// eslint-disable-next-line no-unused-vars
const [unused, encodedFrontMatter, pageContent] = fileContent.split("---")
const [unused, encodedFrontMatter, ...pageContent] = fileContent.split("---")
const frontMatter = yaml.parse(encodedFrontMatter)
return { frontMatter, pageContent }
return { frontMatter, pageContent: pageContent.join("---") }
}

const convertDataToMarkdown = (frontMatter, pageContent) => {
Expand Down

0 comments on commit f35acfb

Please sign in to comment.