allow yaml frontmatter parsing

This commit is contained in:
Shawn Erquhart 2017-07-26 22:10:19 -04:00
parent 7a744bef84
commit de1e36108d

View File

@ -446,11 +446,6 @@ const remarkImagesToText = () => {
export const markdownToRemark = markdown => { export const markdownToRemark = markdown => {
const parsed = unified() const parsed = unified()
.use(markdownToRemarkPlugin, { fences: true, pedantic: true, footnotes: true, commonmark: true }) .use(markdownToRemarkPlugin, { fences: true, pedantic: true, footnotes: true, commonmark: true })
.use(function() {
const { blockMethods } = this.Parser.prototype;
// Remove the yaml tokenizer, as the rich text editor doesn't support frontmatter
blockMethods.splice(blockMethods.indexOf('yamlFrontMatter'), 1);
})
.parse(markdown); .parse(markdown);
const result = unified() const result = unified()