408

I'm trying to see my markdown nested list items rendered with corresponding indentation when viewed in a browser live from the Bitbucket pages. But I can't figure out how it works even when using their examples (updated):

* Item 1
* Item 2
* Item 3
  * Item 3a
  * Item 3b
  * Item 3c

It ignores indentation for items 3a-c:

bitbucket rendered list

I want it to look like this (syntax works perfectly fine on SE and Github):

SE rendered list

Their list in list example is particularly unacceptable:

1. Step 1
2. Step 2
3. Step 3
   * Item 3a
   * Item 3b
   * Item 3c

list in list on bb

Here's a repo I set up just for this.

Jeff Puckett
  • 37,464
  • 17
  • 118
  • 167
  • 16
    Did you indent by four spaces? Or less? – Waylan Jun 02 '16 at 12:51
  • If you have a triple nested list (list in a list in a list), the only way to do it is to use 2 spaces for the first indentation (the first nested list) and 4 spaces for the second indentation (the second nested list) – tsveti_iko May 17 '22 at 16:00

5 Answers5

711

Use 4 spaces.

# Unordered list

* Item 1
* Item 2
* Item 3
    * Item 3a
    * Item 3b
    * Item 3c

# Ordered list

1. Step 1
2. Step 2
3. Step 3
    1. Step 3.1
    2. Step 3.2
    3. Step 3.3

# List in list

1. Step 1
2. Step 2
3. Step 3
    * Item 3a
    * Item 3b
    * Item 3c

Here's a screenshot from that updated repo:

screenshot

Thanks @Waylan, your comment was exactly right.

Jeff Puckett
  • 37,464
  • 17
  • 118
  • 167
  • 11
    It's also worth mentioning that it's good practice not to number your lists in some cases. If they are only meant to read in rendered form, using "1." for every item will cause them to be autonumbered. This should be avoided if you're trying to maintain text readability though. – Nilpo Apr 15 '18 at 21:35
  • 4
    Any reason why linters are starting to suggest 2 spaces for nested list content? – Greg Hilston Jun 29 '19 at 15:50
  • 1
    I could not figure out how to do it in the new Atlassian Editor that they are rolling out in Labs. https://confluence.atlassian.com/doc/the-editor-251006017.html But maybe this is the answer? https://confluence.atlassian.com/doc/confluence-wiki-markup-251003035.html#ConfluenceWikiMarkup-Lists – Ryan Sep 02 '19 at 00:15
  • 1
    some implementations use four spaces for code blocks so this couldn't be used for nesting – Pablo Pazos Nov 18 '19 at 03:00
  • 3
    @PabloPazos this question is specifically about Bitbucket's implementation, which is arguably wanting. – Jeff Puckett Nov 18 '19 at 03:07
  • 1
    my comment is contextual for other readers so they don't try this on "other implementations", e.g. GitHub – Pablo Pazos Nov 18 '19 at 03:13
  • @Ryan If you haven't already figured it out, yes, that is the issue with Jira's new editor. I really wish that they would update their documentation, this has been driving me crazy. – Sean Brookins Jan 31 '20 at 18:03
  • ‍♂️ Man... I upvoted this because obviously it is correct. But I want to downvote because I hate that this is the answer lol. Thank you! – TJ Olsen Oct 04 '20 at 02:51
  • It might also be helpful to note that it was a combination of this, and not having an empty line between my list and text that was not a header. – TJ Olsen Oct 04 '20 at 02:59
  • 1
    @GregHilston I'm also very curious as to why linters suggest 2 spaces only – jasper Jul 17 '23 at 17:18
13

4 spaces do the trick even inside definition list:

Endpoint
: `/listAgencies`

Method
: `GET`

Arguments
:   * `level` - bla-bla.
    * `withDisabled` - should we include disabled `AGENT`s.
    * `userId` - bla-bla.

I am documenting API using BitBucket Wiki and Markdown proprietary extension for definition list is most pleasing (MD's table syntax is awful, imaging multiline and embedding requirements...).

gavenkoa
  • 45,285
  • 19
  • 251
  • 303
9

Possibilities

  • It is possible to nest a bulleted-unnumbered list into a higher numbered list.
  • But in the bulleted-unnumbered list the automatically numbered list will not start: Its is not supported.
  • To start a new numbered list after a bulleted-unnumbered one, put a piece of text between them, or a subtitle: A new numbered list cannot start just behind the bulleted: The interpreter will not start the numbering.

In practice

  1. Dog
  2. German Shepherd - with only a single space ahead. 2. Belgian Shepherd - max 4 spaces ahead.
  • Number in front of a line interpreted as a "numbering bullet", so making the indentation. * ..and ignores the written digit: Places/generates its own, in compliance with the structure. * So it is OK to use only just "1" ones, to get your numbered list. * Or whatever integer number, even of more digits: The list numbering will continue by increment ++1. * However, the first item in the numbered list will be kept, so the first leading will usually be the number "1".
    1. Malinois - 5 spaces makes 3rd level already.
      1. MalinoisB - 5 spaces makes 3rd level already.
      2. Groenendael - 8 spaces makes 3rd level yet too.
      3. Tervuren - 9 spaces for 4th level - Intentionaly started by "55".
      4. TervurenB - numbered by "88", in the source code.
  1. Cat
  2. Siberian; a. SiberianA - problem reproduced: Letters (i.e. "a" here) not recognized by the interpreter as "numbering".
  • No matter, that it is indented to its separated line in its source code: The indentation is ignored here. 2. Siamese
  • a. so written manually as a workaround misusing bullets, unnumbered list.
petezurich
  • 9,280
  • 9
  • 43
  • 57
Franta
  • 986
  • 10
  • 17
8

This worked for me in Bitbucket Cloud.

Entering this:

* item a
* item b
** item b1
** item b2
* item3

I've got this:

enter image description here

AAA
  • 155
  • 1
  • 3
  • Just tried this in 2023 in Bitbucket Cloud and it doesn't work (anymore). For instance: ``` * Feature: Updates multiple components: ** Harbor chart: 13.2.7 -> 16.4.10 ** Postgresql-ha chart: 8.6.13 -> 10.0.5 ** Harbor version: 2.5.1 -> 2.7.1 ** Redis version: 6.2.7 -> 7.0.11 ** Postgres-exporter: 0.10.0 -> 0.12.0 ``` renders as: ```text Feature: Updates multiple components: Harbor chart: 13.2.7 -> 16.4.10 Postgresql-ha chart: 8.6.13 -> 10.0.5 Harbor version: 2.5.1 -> 2.7.1 Redis version: 6.2.7 -> 7.0.11 ** Postgres-exporter: 0.10.0 -> 0.12.0 ``` – jvleminc Aug 16 '23 at 13:42
-7

Even a single space works

...Just open this answer for edit to see it.

Nested lists, deeper levels: ---- leave here an empty row * first level A item - no space in front the bullet character * second level Aa item - 1 space is enough * third level Aaa item - 5 spaces min * second level Ab item - 4 spaces possible too * first level B item

Nested lists, deeper levels:

  • first level A item - no space in front the bullet character
    • second level Aa item - 1 space is enough
      • third level Aaa item - 5 spaces min
    • second level Ab item - 4 spaces possible too
  • first level B item

    Nested lists, deeper levels:
     ...Skip a line and indent eight spaces. (as said in the editor-help, just on this page)
    * first level A item - no space in front the bullet character
     * second level Aa item - 1 space is enough
         * third level Aaa item - 5 spaces min
        * second level Ab item - 4 spaces possible too
    * first level B item
    
Franta
  • 986
  • 10
  • 17
  • 1
    One space is not enough on second level – JGallardo Jun 25 '19 at 21:30
  • "One space is not enough on second level" .. What are you talking about, @JGallardo? I have prepared the practical usage, which shows, that it really works. Whay did I present the source code, in my answer? ..Just see it yourself: Open it for edit. (but do not change it, please.) – Franta Sep 02 '19 at 23:58
  • See the similar topic and my answer there: Pretty the same, copy/pasted. https://meta.stackexchange.com/a/325252/361135 – Franta Sep 16 '19 at 15:51
  • 7
    Sure in this editor here it works but the question is about BitBucket and it did not work there. At least not when i last checked in June 2019. Perhaps it used to when you wrote the original answer, but not to the best of my current knowledge. – JGallardo Sep 17 '19 at 18:12