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

section starts need double newline

Open starpit opened this issue 4 years ago • 7 comments

Using 6.11.4, the following input is not handled as well as with other tools.

### S1
C1
### S2
C2

Actual

The second triple-hash is not treated as a new section.

Screen Shot 2020-06-22 at 12 24 53 PM

Expected

Two sections (github's own preview seems to handle this fine, as does vscode's, as does https://dillinger.io/, etc.). E.g. when i place a newline before the second section:

### S1
C1

### S2
C2

then markdown-to-jsx parses it as do the other tools (without the extra newline):

Screen Shot 2020-06-22 at 12 25 19 PM

starpit avatar Jun 22 '20 16:06 starpit

bump on this one, just encountered it too #337

czterystaczwarty avatar Oct 14 '20 13:10 czterystaczwarty

Yes, I am having the same issue with markdown generated via some Draft.js editor plugin

weyert avatar Oct 22 '20 13:10 weyert

I have similar issue

//single newline doesn't work after the colon
test:
- li
- li


//double newline works after the colon
test:

- li
- li

Screenshot 2020-12-04 at 10 42 25

github markdown test which works with single newline

//single newline works test:

  • li
  • li

//double newline works test:

  • li
  • li

SarKurd avatar Dec 04 '20 09:12 SarKurd

fwiw, we have switched to react-markdown which, under the covers, uses remark-parse for parsing. With react-markdown v5 (which uses remark-parse v9), we have found the parsing to be pretty robust (v4/v8 had several parser bugs that impacted us, but v5/v9 seems pretty good)

starpit avatar Dec 04 '20 13:12 starpit

@starpit thanks for suggesting, will check it out

SarKurd avatar Dec 04 '20 14:12 SarKurd

Using 7.1.1, this behavior hasn't changed.

Vadorequest avatar Mar 25 '21 10:03 Vadorequest

Using 7.1.3 still not changed,maybe author already forget this,let me mention @probablyup

joebnb avatar Oct 12 '21 09:10 joebnb