why does <h1>title<h1>
can't wrap by <p>
tag even when it's rendered as a string?
#1309
-
const text=`<h1>title<h1>,foofoo`;
<ReactMarkdown>{text}</ReactMarkdown>; I've seen this issue,but why it can't wrapped by |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Welcome @mosade! 👋 First, let me clarify your intent by asking a few questions:
The reason your example code doesn't wrap the string in a If you want the To clarify your intent and provide a more specific solution, please let me know your answers to the questions above. Understanding the actual problem you're trying to solve will help the community give you a more accurate and helpful ideas. |
Beta Was this translation helpful? Give feedback.
Again, it would be really beneficial to give some context on the actual problem you are facing.
Currently you are really focused on what you think is a solution, adding a paragraph (XY Problem).
It's unclear if it will actually or effectively solve the underlying problem.
You can read more on the XY problem here: https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem
To answer your direct question, it is possible to add wrapping tags, through remark/rehype plugins https://unifiedjs.com/learn/