Open okdistribute opened 2 years ago
Partial support for this should be landing in v0.40.0. By partial support, I mean that everything that is highlighted in a .md
file will be highlighted in a .mdx
file. From what I can tell, this is just a temporary solution and full support will come later on.
Works for me! Thanks
Would love for MDX the full support to also play nicely with prettier-ignore
so I could have an MDX file like this:
---
title: "A Minimal Valid HTML5 Document"
---
import Abbr from "../../components/abbr";
import HtmlTag from"../../components/html-tag";
When writing <Abbr a="HTML" />, keeping the document valid is a good first step towards accessibility. Compared to XHTML, HTML5 validation is surprisingly lenient, requiring only a <HtmlTag t="DOCTYPE" /> and a <HtmlTag t="title" /> element.
{/* prettier-ignore */}
```html
<!DOCTYPE html>
<title>A minimum valid HTML5 document</title>
<p>I’m the content.
The document above is valid even though it doesn’t contain an
Is your feature request related to a problem? Please describe.
md
syntax highlighting works great, butmdx
is not supported. MDX allows you to mix and match JSX with markdown content.Describe the solution you'd like Allow markdown syntax highlighting with mdx files using an off-the-shelf syntax highlighter. VSCode plugin example
Describe alternatives you've considered Treat mdx as md, and it won't parse the JS correctly but that's OK, at least the markdown will be highlighted.
Thanks!