Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

html table in readme does not render as table

Stephan Hradek
Contributor
April 4, 2018 edited

Since I require a line break in one of my table cells, I converted my CommonMark / Markdown table into pure HTML.

But it is not rendered as a table in my readme.md, it is simply shown as text, meaning: I can see all html tags.

Below the (shortened) source

 

some headline
-------------

<table>
<thead>
<tr><th>
Shortcode / Attribute
</th><th>
Funktion
</th></tr>
</thead>
<tbody>
<tr><td>
[something] … [/something]
</td><td>
Umklammert den Bereich in dem die folgenden Shortcodes gelten.
</td></tr>
<tr><td>
[domain]
</td><td>
Wird ersetzt durch die Domain des Kundenseite.
</td></tr>
</tbody>
</table>

some more text

 Can anyone explain what's going wrong here?

Update: https://confluence.atlassian.com/bitbucketserver/markdown-syntax-guide-776639995.html suggested that I should,

>For a full list of all the Markdown syntax, consult the CommonMark help or specification.

Which gave me the impression that I can use html tables.

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2018

 

Hi Stephan! Bitbucket does not support <html> so you need to use the - (dash) and the | (pipe) symbols to construct a table. The first line contains column headers. Separate columns with the pipe symbol.

The second line must be a mandatory separator line between the headers and the content. Subsequent lines are table rows. Columns are always separated by the pipe (|) character. For example:

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell

You can only put simple lines in a table.

For more info about what you can do with tables, I recommend you checking  Markdown demo.

Hope that helps!

Ana

Stephan Hradek
Contributor
April 9, 2018

So the documentation I found (https://confluence.atlassian.com/bitbucketserver/markdown-syntax-guide-776639995.html) is wrong or at least misleading!?

Like • joelbradshaw likes this
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 13, 2018

I'm not sure what you mean, in that documentation says that for tables you should use 

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

Which is similar to what I showed you before.

Were you referring to something else?

Kind regards,

Ana

Stephan Hradek
Contributor
April 13, 2018

And further to the top it says:

 

Markdown syntax

The page below contains examples of Markdown syntax. For a full list of all the Markdown syntax, consult the CommonMark help or specification.

 

Since it explicitly says "examples", I followed the links. The text suggests that the definitiv syntax is described there.

Like • joelbradshaw likes this
D. Nappo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 6, 2019

Documentation says that a limited HTML tags are supported in README.md and that set contains all table related tags.

I need raw HTML for rowspan and cellspan (not possible with markdown) but it seems that's not supported by bitbucket so yes, that document is misleading and should be updated.

Like • 3 people like this
rtasooji
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2020

One year old post and no change at all!

HTML limitations in markdown is a big thing! This is not a feature to be implemented it is a must have thing for documenting. People are keep asking this for years now and nothing so far! If the source code is available, please direct us to the source code and we can work on adding some of html features.

Thank you

Like • 2 people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events