Markdown: Nested lists not working (BB-8925)

Robert Jeppesen avatarRobert 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 (7)

  1. Robert Jeppesen

    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. hannwong

    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. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.