Remark: Parse error with newline and image at beginning

Created on 3 Jul 2019  路  4Comments  路  Source: remarkjs/remark

Subject of the issue

Parsing the following file causes the error 1:1: Incorrectly eaten value.

+++
# Some toml metadata
+++

![](myimage.png)

The parse error seems to be caused by the newline followed by an image.

Your environment

I'm using NetlifyCMS 2.9.5 which uses remark-parse ^3.0.1.

remark-parse 馃檵 typquestion

Most helpful comment

This should be resolved when we update everything on the Netlify CMS markdown widget, not a current remark bug.

Sent with GitHawk

All 4 comments

I tested with [email protected] and the content was parsed without an issue.
https://astexplorer.net/#/gist/86a23b67e55c09e1a4d7d267d99f85fe/7b311cf09c9d5427e099aceb0fba0a1797c6d036

What remark plugins have been added in Netlify?
What wrappers are being put around remark?

I'm trying to find out - but I'm not a NetlifyCMS developer (yet). I think those are the plugins:

    "rehype-parse": "^3.1.0",
    "rehype-remark": "^2.0.0",
    "rehype-stringify": "^3.0.0",
    "remark-parse": "^3.0.1",
    "remark-rehype": "^2.0.0",
    "remark-stringify": "^3.0.1",

Found here: https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms-widget-markdown/package.json

One way to get a list of remark plugins is to run:

# for linux and OSX
npm ls | grep "remark"

# for Windows
npm ls | find "remark"

This should be resolved when we update everything on the Netlify CMS markdown widget, not a current remark bug.

Sent with GitHawk

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jolg42 picture Jolg42  路  4Comments

rauschma picture rauschma  路  4Comments

ikatyang picture ikatyang  路  7Comments

muescha picture muescha  路  6Comments

maximbaz picture maximbaz  路  7Comments