MDX 3
- Dominant language
- JavaScript
- Stars
- 52.3k
- Forks
- 5k
- Avg merge
- 19h 2m
- Merged PRs (30d)
- 117
Description
MDX 2 was released on 1 Feb 2022: https://github.com/mdx-js/mdx/releases/tag/2.0.0
UPD: MDX 3 was released on 24 Oct 2023: https://github.com/mdx-js/mdx/releases/tag/3.0.0
The changes are summarised in the blog post: https://mdxjs.com/blog/v2/
UPD: https://mdxjs.com/migrating/v3/
Here is a big one for Prettier:
Originally, the format was very close to how markdown, and HTML in markdown, works. We found that the old behavior often yielded unexpected results. In version 2, we shift the format a little bit closer to how JS(X) works.
The example below is from the blog post. It is a valid MDX in v2, but Prettier 2.5.1 is unable to parse it:
Prettier 2.5.1
Playground link
--parser mdx
Input:
<div>*hi*?</div>
<div>
# hi?
</div>
<main>
<div>
# hi?
</div>
</main>
Output:
SyntaxError: Unexpected token (2:12)
1 | <$><main>
> 2 | <div></$>
| ^
Expected behavior:
No syntax error
Let’s track MDX 2 3 support here 👀
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.