Raymond
Raymond

Reputation: 23

Bitbucket Markdown - Add a Table to a Numbered List Item

I wish to add a table to a numbered list in bitbucket markdown.

Something like this:

1. Define the following role for the user:     

    |Role            |Description           |                                          
    |---             |---                   |                                              
    |**UserRole**    |The role is blah-blah |

2. Etc

I tried indenting by 4 spaces and 8 spaces. Neither shows the table as it should, but the 8 spacing at least shows the table as a pre-formatted table. What can be done to present the table as a proper table?

Upvotes: 1

Views: 2121

Answers (2)

user77343
user77343

Reputation: 63

I solved distorted table rendering in a numbered list in Bitbucket by removing outside (most left and most right) vertical bars for all rows. The appearance of the table stayed unchanged.

Following your example:

1. Define the following role for the user:  

    Role            |Description                                                     
    ---             |---                                                                 
    **UserRole**    |The role is blah-blah 

2. Etc

Upvotes: 2

Waylan
Waylan

Reputation: 42567

It appears that you have either encountered a bug or Bitbucket has intentionally disallowed such behavior. Unfortunately, Bitbucket's documentation regarding table support is extremely sparse. It consists solely of the following example:

| Day     | Meal    | Price |
| --------|---------|-------|
| Monday  | pasta   | $6    |
| Tuesday | chicken | $8    |

Rumor has it that Bitbucket uses Python-Markdown as their Markdown parser (full discloser: I am the developer of Python-Markdown). However, I have never seen any official confirmation of that. And which table extension they use is even less clear. As it happens, the table extension that comes with Python-Markdown parses your example just fine, which suggests they are using some custom extension.

I would suggest filing a bug report with Bitbucket.

Upvotes: 0

Related Questions