Issue #7748 invalid

Markdown: Nested lists not working (BB-8925)

Robert Jeppesen
created an issue

When displaying a repositorys readme.md, nested lits don't work. It displays as a long, flat list.

This code should be rendered as nested lists:

* Patientens betalningsmodell ändras till '80 - Nationell frisktandvård' (PMC 111)
* För den behandlingsperiod där NF-åtgärden ligger, 
  * Betalningsmodell ändras till '80 - Nationell frisktandvård' (PMC 111)
  * Abonnemangsperiod sätts till avtalets start- och slut-datum
  * Kör procedur för att sätta igång FK-abonnemang
  * Skriv in bruttopriset för avtalet i AddInfo-frågan 1052

The flat list can also be seen in this issue:

  • Patientens betalningsmodell ändras till '80 - Nationell frisktandvård' (PMC 111)
  • För den behandlingsperiod där NF-åtgärden ligger,
  • Betalningsmodell ändras till '80 - Nationell frisktandvård' (PMC 111)
  • Abonnemangsperiod sätts till avtalets start- och slut-datum
  • Kör procedur för att sätta igång FK-abonnemang
  • Skriv in bruttopriset för avtalet i AddInfo-frågan 1052

Comments (9)

  1. Robert Jeppesen reporter

    Thanks! Good to know.

    Still a bug though. Markdown allows you (in text) to align the sub-list nicely with the text in the parent. Works in Github, markdown preview for sublime, 'markdown here' Chrome plugin for gmail, stackoverflow.

  2. Jon Wong

    This is actually a bug in the markdown.pl, the original implementation of MarkDown. Your "4 spaces per nesting level" rule is consistent with the official MarkDown specification, albeit in a rather obscure way:

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

    GitHub follows the markdown.pl implementation, bug and all. That means, list nesting can be done with just 1 space.

    Do consider putting up some FAQ on this, so as to educate more people to follow the "4 spaces per nesting level" rule. MarkDown is messy and lack maintenance enough as it is now. I do wish somebody will take that specification, update it, and create a proper reference implementation from it.

    I agree with your using Python's implementation of MarkDown. It is most updated.

  3. Totte Karlsson

    Spent half an hour figuring this one out..:( All documentation mentions 2!! spaces for nested list, while here you need 4 spaces.

    How is one to figure that one out?? Fix the documentation or fix the bug!! If it does not work, it is a bug.

  4. Log in to comment