remarkjs / react-markdown

Markdown component for React
https://remarkjs.github.io/react-markdown/
MIT License
13.27k stars 876 forks source link

Does not parse ordered list from markdown correctly, #806

Closed zerogtiger closed 11 months ago

zerogtiger commented 11 months ago

Initial checklist

Affected packages and versions

react-markdown (^9.0.0), rehype-raw (^7.0.0)

Link to runnable example

No response

Steps to reproduce

Run the following snippet in a suitable JS file: (node version 21.2.0, npm version 10.2.5)

    <ReactMarkdown rehypePlugins={[rehypeRaw]} children={'<ol><li>Item 1</li><li>Item 2</li><li>Item 3</li></ol>'} />

Expected behavior

  1. Item 1
  2. Item 2
  3. Item 3

Actual behavior

  item 1   item 2   item 3

Runtime

No response

Package manager

No response

OS

macOS

Build and bundle tools

Next.js

ChristianMurphy commented 11 months ago

Welcome @zerogtiger! 👋 Sorry you ran into a spot of trouble.

I can't replicate the issue you describe on the playground page https://remarkjs.github.io/react-markdown/

Are you using Tailwind or another styling library with heavy-handed resets on your page? This is the most likely root cause.

The second most likely is a mismatch between dependency versions. Make sure both react markdown and rehype raw are on the latest version.

github-actions[bot] commented 11 months ago

Hi! Thanks for taking the time to contribute! This has been marked by a maintainer as needing more info. It’s not clear yet whether this is an issue. Here are a couple tips:

Thanks, — bb

zerogtiger commented 11 months ago

Hey Christian,

Thanks for the quick reply. I am indeed using tailwindcss and have pinpointed the issue thanks to your reminder. It does not have to do with rehype or react-markdown.

Wishing you a wonderful holiday season!

github-actions[bot] commented 11 months ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

github-actions[bot] commented 11 months ago

Hi team! I don’t know what’s up as there’s no phase label. Please add one so I know where it’s at.

Thanks, — bb

github-actions[bot] commented 11 months ago

Hi! Thanks for reaching out! Because we treat issues as our backlog, we close issues that are questions since they don’t represent a task to be completed.

See our support docs for how and where to ask questions.

Thanks, — bb