ChristopherBiscardi / gatsby-mdx

Gatsby+MDX • Transformers, CMS UI Extensions, and Ecosystem Components for ambitious projects

Home Page:https://gatsby-mdx.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some HTML comments cause an Unexpected Token error

valentine opened this issue · comments

Describe the bug
This HTML test document breaks when parsed with MDX. It works with Remark.

  SyntaxError: unknown: Unexpected token (135:1)
    133 | </blockquote>
    134 | <small><a href="#wrapper"  >[top]</a></small>  m
  > 135 | <!-- End of Sample   33mContent -->
        |  ^
    136 |     </MDXLayout>
    137 |   )

To Reproduce
Create a .md or .mdx file, and add the contents of this HTML test document to it.

The error is somehow fixed when a new line is added in between the <small> tag (line 134) and the HTML comment (line 135).

Expected behavior
The HTML file should parse just fine.