Skip to content

RFC: MDX comment syntax #1042

@johno

Description

@johno

As part of #1039 comment syntax currently only supports JS comment expressions:

# Hello, world!

{/* I am a comment */}

This syntax is nice because it feels more JSX-y than HTML comments. However, it comes at a cost of interoperability with Markdown (which uses HTML comments).

I'm inclined to think ensuring that we also support HTML comments (despite it being a bit precarious to have multiple syntaxes) is worth it so that your average Markdown/README file works with MDX out of the box.

# Hello, world!

{/* I'm a comment */}
<!-- I'm a comment, too! -->

Anyone have any thoughts or opinions here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions