Skip to content

fix(ui): replace outer p tag with div in CustomCard to prevent invalid HTML nesting - #654

Open
Vinit-786 wants to merge 1 commit into
containers:mainfrom
Vinit-786:fix/customcard-dom-nesting
Open

fix(ui): replace outer p tag with div in CustomCard to prevent invalid HTML nesting#654
Vinit-786 wants to merge 1 commit into
containers:mainfrom
Vinit-786:fix/customcard-dom-nesting

Conversation

@Vinit-786

Copy link
Copy Markdown

Fixes #653

Concisely describe the change

Replaced the outer <p id="cardBody-parsed"> wrapper with a <div> in src/components/ui/CustomCard/index.tsx.

Markdown renders ReactMarkdown, which outputs block-level elements such as <p> for markdown content. Wrapping it inside another <p> produces invalid nested paragraph markup. Using a <div> preserves valid HTML while allowing markdown content to render correctly.

Before screenshot / screen recording

After screenshot / screen recording

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • [ x] Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • [ x] Referenced issues using Fixes: #00000 in commit message (if applicable)
  • [ x] PR description, commit message, and GitHub comments are human-written, per LLM Policy

…d HTML nesting

Signed-off-by: Vinit-786 <vinitmahajan175@gmail.com>
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

Successfully merging this pull request may close these issues.

[Bug]: Invalid HTML DOM nesting (<p> wrapping <Markdown />) in CustomCard component

1 participant