-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Markdown in nested HTML #486
Comments
@johno Do you plan to support Markdown in only HTML: <div>
# Example
</div> or inside a Component? <Example>
# Example
</Example> |
@Undistraction I think that’s already supported. But you need to add a space:
|
@morloy Thanks for replying. It seems it is supported, but not officially and is undocumented. |
I just spent some time trying to figure out how to get this mdx to render the backticks properly:
Turns out all I had to do was write:
So yay because it just works but I think it is worthwhile to add this to the docs somewhere. |
@joostdecock That shouldn't be documented as is yet imo, it forces a block doesn't? See my comment in #241 . You can try the button example in the MDX websites playground, notice the style differs from inline declared button?(which doesn't require a newline). I have a need to conditionally return an inline code block ` tag, which is I guess understandable? The button is example is probably the same issue actually(I didn't inspect the markup at the time). Still, if you document it, make it clear that by default the content is wrapped in a paragraph tag(as it becomes a new MDX context/embed?). |
since this is closed not sure if I can ask here. is markdown inside nested html supported now? I am running into similar error when using markdown inside jsx like this
version: |
@rameshjanjyam markdown in html is supported now. |
thank you @ChristianMurphy |
Subject of the issue
Currently, MDX crashes on Markdown in nested HTML.
Example:
Works.
Crashes! Resulting in something like:
This makes it impossible to use Markdown in a table, since you need to nest some
table
,tr
, andtd
tags in HTML.Your environment
Tried with the
create-react-app
example:The text was updated successfully, but these errors were encountered: