Replies: 1 comment 3 replies
-
I recommend turning it off for MDX. It doesn’t support MDX 2 +. How about: <ContentBlock>
Notice that every website is comprised of one *root element* — `html`. All
other elements must be nested inside this element to be parsed correctly by
a web browser. This element takes in only a few attributes, one of which is
`lang`, which accepts
a <Term definition={<>e.g. <code>en</code> for english</>}>language code</Term>
to specify the language of all text content within the website.
</ContentBlock> Or: export const languageCodeDescription = <>e.g. <code>en</code> for english</>
<ContentBlock>
Notice that every website is comprised of one *root element* — `html`. All
other elements must be nested inside this element to be parsed correctly by
a web browser. This element takes in only a few attributes, one of which is
`lang`, which accepts
a <Term definition={languageCodeDescription}>language code</Term>
to specify the language of all text content within the website.
</ContentBlock> |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've seen previous discussions arround this topic at #1798 and have also read the documentation for Interleaving. I want to present my use case because I am unsure of how to work around MDX's "block" philosophy:
This is a piece of my mdx that has been formatted with Prettier. As you can see, it spans multiple lines. The issue is that I need the entire text copy, including the Term, to be under one paragraph tag so that the term displays inline. MDX creates 2 paragraph tags before and after the term, which ends up looking like this:
As you can see, I've also tried wrapping the term in a JSX expression, but that didn't do much because the text copy itself is still parsed by markdown. What I'm looking for is a way to avoid the block parsing while still being able to use fundamental markdown features such as inline code and italics (which is what I'm really interested in).
Is there an existing solution or would a fix for this be outside the project's scope?
Beta Was this translation helpful? Give feedback.
All reactions