Skip to content

Inline comment directly after jsx block fails to parse. #784

@mjhenkes

Description

@mjhenkes

Subject of the issue

Adding an inline md comment directly after an inline html/jsx block in a markdown file causes mdx to fail to parse.

Similar to this issue: #243

Your environment

  • OS: macos
  • Packages: "@mdx-js/react": "^1.4.5",

Steps to reproduce

ON the sample site, add an inline comment to the in html example.

# Below is a JSX block

<div style={{ padding: '10px 30px', backgroundColor: 'tomato' }}>
  <h2>Try making this heading have the color green</h2>
</div>
<!-- AUTO-GENERATED-CONTENT:END -->

🎉 BONUS POINTS for creating a minimal reproduction and uploading it to GitHub. This will get you the fastest support. 🎉

Expected behaviour

The comment is ignored.

Actual behaviour

Parsing fails.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions