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

List in wiki/Markdown-Cheatsheet renders incorrectly

Open tkzv opened this issue 5 years ago • 3 comments

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. 1. 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.
  1. Actual numbers don't matter, just that it's a number
  2. Ordered sub-list
  3. 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.

tkzv avatar Aug 15 '19 12:08 tkzv

Was just wondering. Glad someone has brought this up!

KunhuanLiu avatar Aug 26 '19 04:08 KunhuanLiu

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.

baniocarpentercode42 avatar Feb 28 '20 16:02 baniocarpentercode42

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

tkzv avatar Mar 01 '20 19:03 tkzv