question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lists should not require blank line before them

See original GitHub issue

Often a list will have a block of text before it as a heading. Markdown-to-jsx seems to require a blank line between the text before it and the list itself. Using markdown-to-jsx, this:

Header:
* item 1
* item 2

Is rendered like this:

Header: * item 1 * item 2

Using the same block of text in Github’s own markdown editor, this is what I get:

Header:

  • item 1
  • item 2

John Gruber’s markdown syntax guide doesn’t give a hard rule about how this edge case should be handled. However, in testing other tools, markdown-to-jsx is the only one I’ve run into that seems to have this restriction. While all of them allow a blank line and that’s fine, I’m of the opinion it shouldn’t be required since there is no spec to say it should be. A more flexible implementation is more user-friendly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:6

github_iconTop GitHub Comments

1reaction
ghostcommented, Jul 23, 2019

I recognized that two consecutive lists with only one blank line cause trouble:

If you paste

1. Test
2. Test

- Item 1
- Item 2

into the front-end https://probablyup.com/markdown-to-jsx/ then the output is a bit unexpected.

0reactions
SQRedercommented, May 14, 2021

Bump

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blank lines before lists, revisited - CommonMark Discussion
Currently CommonMark does not require a blank line between a regular paragraph and a list. In this respect it differs from most current ......
Read more >
Explain that lists and bullets require empty line before #46
When using markdown in the real world, one common and frustrating issue when using bullets and lists is that a blank line is...
Read more >
List Markdown doesn't work unless preceded by a blank line
It would take one line in the Markdown reference to fix. I realize that there is a limit on how much detail you...
Read more >
Numbered Lists..Need blank line in between list items
Solved: Hi. Here is my issue. I am using RH 7. When I use the numbered list feature, there are no blank lines...
Read more >
No empty line after numbered list | WordPress.com Forums
My first paragraph following a numbered list appears immediately after the list without a blank line. Going into the HTML editor and adding ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found