1. Bitbucket Website
  2. Public Issue Tracker
  3. master

Issues

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 (20)

  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. Adam Phillabaum

    Please reconsider. It's a pretty standard to expect that a single space would work. Also, it's kind of rude to mark this as "invalid." It might be better to mark it as "Feature request." Thanks!

  5. timofonic timofonic

    I'm not sure this is the best place to comment this, but I find MarkDown sometimes a bit insane.

    • I usually write very fast on keyboards, specially mechanical and excellently on clicky (Model M) ones. * I would prefer to put a repeated "" character instead spaces, because it fits a lot better with my workflow.

    • My ideal markdown syntax:

    "-" This is the typical list with the "-" symbol. "* This is a nested paragraph about the list" " This is a nested list inside the former one". " This is nested into the second item too" "Here we go back to the level after the "-" item.

    Why can't I do this? Why so many MarkDown forks? It drives me insane and makes MarkDown useless.

    • I already find html and phpbb to be too annoying to use, the syntax is too verbose.
    • MarkDown has many quirks that make my workflow quite slow in certain ways, something that is quite bad when making fast notes for ideas and study.
  6. Charles Jungmann

    Timm Preetz,

    I have also been frustrated with Markdown rendering on BitBucket, but using CommonMark does indeed properly indent bullet lists. It just has to be enabled.

    When on the source page, just to the left of the BLAME, RAW, and EDIT buttons is a drop-down that said "Default File Viewer". If the CommonMark addon has been installed, you can use that dropdown to enable the CommonMark viewer, and you will find that indenting works, as well as code blocks with proper syntax highlighting.

    No solution comes without a problem, though. The inter-file links in my Markdown files don't work in CommonMark mode. I have to switch back to default mode to jump, then back to CommonMark to view.

  7. Log in to comment