Skip to content
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

validateDOMNesting(...): <pre> cannot appear as a descendant of <p> #537

Open
MenroMi opened this issue Sep 20, 2023 · 0 comments
Open

validateDOMNesting(...): <pre> cannot appear as a descendant of <p> #537

MenroMi opened this issue Sep 20, 2023 · 0 comments

Comments

@MenroMi
Copy link

MenroMi commented Sep 20, 2023

Describe the bug
Hello. I would like to report a bug what I noticed. When I try to use the markdown code in the context of some other text, the lib puts a pre tag in the p tag, and this produces a warning. Btw i am using react-syntax-highlighter with react-markdown

To Reproduce
Steps to reproduce the behavior:

  1. Write code in common text
  2. This situation called the warning

Expected behavior
I thought that should be work like this case:

<div id="container">
  <p id="left-part-text"></p>
    <pre id="code-part">
      <code></code>
    </pre>
  <p id="right-part-text"></p>
</div>

Maybe I want a lot, but maybe someone knows the answer...
Screenshots
pre
pre1

Desktop (please complete the following information):

  • OS: macOS Ventura 13.5.2
  • Browser: chrome
    -Version 116.0.5845.187 (Official Build) (arm64)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant