markdown-to-jsx icon indicating copy to clipboard operation
markdown-to-jsx copied to clipboard

Paragraph wrongly included to list item

Open hanayashiki opened this issue 4 years ago • 4 comments

For the following md:

4. Title

     Paragraph1

     + Option1
     + Option2 

     Paragraph2

It should be displayed like this:

  1. Title

    Paragraph1

    • Option1
    • Option2

    Paragraph2

(Correct on github)

But markdown-to-jsx renders it incorrectly:

image

It seems that Paragraph2 is included into bullet Option2, unlike github.

This library is very nice and I wish this can be fixed or workarounded.

hanayashiki avatar Jan 26 '21 19:01 hanayashiki

For those who have to solve this problem, I found react-markdown is correct with this.

hanayashiki avatar Jan 26 '21 20:01 hanayashiki

I have a similar issue. I pass an element of type string as a children prop. It looks like that:

<p>* this is my asterisk note</p>

But the markdown-to-jsx rendered it as an object with an unordered list. I thought that the syntax has a problem with the * asterisk character.

patibugaj avatar Jan 27 '21 16:01 patibugaj

try

4. Title

     Paragraph1

       + Option1
       + Option2 

     Paragraph2

Prabhakar-Poudel avatar May 11 '21 22:05 Prabhakar-Poudel

4. Title

     Paragraph1

       + Option1
       + Option2 

     Paragraph2

works! thank you

hanayashiki avatar May 14 '21 18:05 hanayashiki