Lists should not require blank line before them
See original GitHub issueOften 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:
- Created 4 years ago
- Reactions:8
- Comments:6
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I recognized that two consecutive lists with only one blank line cause trouble:
If you paste
into the front-end https://probablyup.com/markdown-to-jsx/ then the output is a bit unexpected.
Bump