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

React text child converted to Paragraph when it contains - or * #245

Open
c10b10 opened this issue Apr 26, 2019 · 3 comments
Open

React text child converted to Paragraph when it contains - or * #245

c10b10 opened this issue Apr 26, 2019 · 3 comments

Comments

@c10b10
Copy link

c10b10 commented Apr 26, 2019

If my Markdown looks like this:

## Title 

<Item>
   Lorem Ipsum
<Item>
<Item>
   Lorem - Ipsum
<Item>
<Item>
   Lorem * Ipsum
<Item>

The last two items will have paragraphs passed as children, instead of simple text like the first item. Might have to do with the parsing for lists? Any way to avoid this?

@c10b10
Copy link
Author

c10b10 commented May 7, 2019

Can you please confirm this?

@quantizor
Copy link
Owner

Hmm weird, the list detect regex must be getting a false positive

@c10b10
Copy link
Author

c10b10 commented May 15, 2019

The issue can be seen by adding a - or a * to content of the <small> tag here: https://probablyup.com/markdown-to-jsx/ and inspecting the content of the resulting <small>. You'll notice a paragraph is inserted when the list characters are present.

I would love to help fix this, but my regex skills are abysmal. Any idea when you'll manage to get a fix in?

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

2 participants