adam-p / markdown-here

Google Chrome, Firefox, and Thunderbird extension that lets you write email in Markdown and render it before sending.
http://markdown-here.com
MIT License
59.64k stars 11.26k forks source link

List in wiki/Markdown-Cheatsheet renders incorrectly #572

Open tkzv opened 5 years ago

tkzv commented 5 years ago

The list example in markdown-here/wiki/Markdown-Cheatsheet contradicts its description.

According to its description, the following code (with middle dots replaced by spaces):

  1. First ordered list item
  2. Another item ⋅⋅* Unordered sub-list.
  3. Actual numbers don't matter, just that it's a number ⋅⋅1. Ordered sub-list
  4. And another item. should render as an ordered list with an unordered sublist after item 2 and ordered sublist after item 3. But it renders like this:
  1. First ordered list item
  2. Another item
    • Unordered sub-list.
  3. Actual numbers don't matter, just that it's a number
    1. Ordered sub-list
  4. And another item.

Looks like the indentation of sublists is ignored and they end up on the level of the main list. Thus the unordered list breaks the parent list in 2 and the ordered sublist items are treated as items of the parent list.

If there is a way to create sublists by GitHub rules, the one wiki suggests is wrong.

KunhuanLiu commented 5 years ago

Was just wondering. Glad someone has brought this up!

baniocarpentercode42 commented 4 years ago

You need four spaces not two so:

2. Another item
⋅⋅⋅⋅* Unordered sub-list. 
1. Actual numbers don't matter, just that it's a number
⋅⋅⋅⋅1. Ordered sub-list
4. And another item.
tkzv commented 4 years ago

Thanks! But the page https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet is still incorrect.